Actually, at this moment, I am configuring a photo sales website using Drupal 7. But I need to solve one issue before I can proceed further.
Here’s my current setup.
1. A content type called “Photo” with image field (private file system).
2. Using flag module to determine if the photo has been purchased or not.
3. At theming layer, the download link is set to appear if the node has been flagged.
However, there is an issue with the setup above. The user will still be able to download the original photo if the link is known. I want to allow user to download the original photo only when the entity has been flagged as purchased. I need a custom module for that.
Please bear in mind that the photo will be used in generating images of different sizes in “Image Styles (Imagecache)” for preview. Those images created by “Image Styles” should not be treated as original photos and will not required any special permission to download.