Hi all,

I'm building a website to serve videos and documentaries. Many of them will be embeds from Youtube or Vimeo, but I'll need to allow certain premium users to directly download large media files (even more than 1 GB!).

I don't want to serve it directly from my Apache server, so I've been thinking in other alternatives but became stuck. I could just redirect these "premium" users to an ftp site, but I'd like to serve files to users with transparent authentication processes.

What would you suggest?

Edited: I'm using shared hosting.

Thanks in advance,

Carles

Comments

carlescliment’s picture

Found threads like this http://drupal.org/node/252583 , but didn't help.

carlescliment’s picture

One approach:

When user becomes premium, system creates a user with the same username in a remote FTP and a random password, which is stored in the site database and sent by email to user. User can change his FTP password from a web interface (all the magic is done with native php-to-ftp functions).

If the user requires downloading a file, he is redirected to the url of the file in the FTP, where he will be asked to log in. This is the bad side of this solution, because he needs additional authentication, not only the Drupal one.

A cron process checks if any user has lost the premium status, and revokes the priviledges of the user in the FTP site.