Hi,
I want to offer audio files for download on my site, after a user has completed a PayPal transaction. The commerce side of it is already written and working - the site is built in PHP with Zend Framework.
So that I don't incur large charges for storage and bandwidth, I'd like to host the files on a service like Amazon S3. However, I'm not sure if this is suitable for my requirements. Once the PayPal transaction is completed, I'd like to assign the user a unique id key of some kind, send them to a location where they enter the key, and the file they have bought is offered for download. The key would then expire.
I have no problem with writing the code to generate, store and delete the key. My question is this: how can I protect/hide a file stored on Amazon S3, and then offer it for download to an authorised user with a URL which subsequently becomes invalid, whilst also transferring the file directly from Amazon, rather than it passing through my server?
Is this possible, or do I need another solution?