Drupal 7 Custom Module for Private Download - repost

Avg Bid (USD)
Project Budget (USD)
$30 - $250

Project Description:
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 using 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.

Things to bear in mind:
1) The private 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.

2) The photo uploader should have access to download his/her own photo without purchasing.

3) I believe you need to have a depth understanding on Drupal file system api in order to complete this project.

FYI, I am following the instructions at http://drupal.org/node/1389248 to setup my photo sales site.

Skills required:
About the employer:
Public Clarification Board
Bids are hidden by the project creator. Log in as the employer to view bids or to bid on this project.
You will not be able to bid on this project if you are not qualified in one of the job categories. To see your qualifications click here.

$ 250
in 5 days
$ 250
in 4 days
$ 250
in 3 days
Hire maiznieks
$ 80
in 3 days
$ 100
in 3 days