Best practice for user-generated video sharing site?

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
aiwata55's picture

Hi all,

I am building a user-generated video sharing site for my client. He wants users with appropriate role can submit their videos to the site and share it. A problem is, for some reasons unknown to me, he wants to use FTP instead of FileField upload functionality to submit a video. Then he wants to get these files hosted by a CDN provider and embed in a node a video file which is retrieved from a CDN provider. A video can last 1 hour or longer sometimes.

I learned that Drupal can use files which were not uploaded with a kind of uploading module such as FileField module, with a help of Media Mover module.

However, I think using FTP is not the best solution for a user-generated video sharing site like this one. Because (1) allowing users to upload video files to the server with FTP means we need to create a dedicated directory per user and gives the directory a right permission, so that a user can upload files only to his/her directory but not to others and he/she cannot even see the contents of directories owned by others. Writing a code for this purpose is unworthy, when Drupal has a very feature-rich access control system. (2) A user has to use two separate system to publish one of his/her videos. One is Drupal, for information about the video such as the title, the date when shot, the teaser, the description, etc. Another is FTP, for uploading the video file.

I may be wrong above. Anyway, if someone can give me a hint to build such a site, I will highly appreciate his/her advice.

Best regards,

Comments

Why FTP instead of a module-based upload

aiwata55's picture

It seems that uploading via FTP is tens times faster than via PHP, according to my short research. Because most modules, if not all, uses PHP, they have this shortcomings in common. Am I correct? If so, this may be why my client wants to use FTP for uploading large files.


Aki Iwata
FOREST & trees

FTP has an option to resume a

darrick's picture

FTP has an option to resume a upload should the connection be lost. With an HTTP upload you'll have to start uploading all over again. Also you'll have to set a huge timeout on the upload process. Uploads can take hours.

With the Media Mover FTP harvest module the user requests a upload token. The user then uploads the file to your anonymous incoming ftp server. If you want to be more secure use pam to authenticate the user via the Drupal user table. You can also make your incoming directory write only by anonymous.

On cron Media Mover will then harvest files with tokens from the ftp directory and store them in your CCK field. It will create a node by the user who owns the token. Any files without tokens will be deleted.

Another Media Mover config can then harvest from the CCK field and store to a CDN.

You could use the Notifiations module to subscribe users to their own new content. That way once there file is harvested and the node created they will get an email. They can then login and update the node with whatever description and tagging info they want.

@darrick I see. So there are

aiwata55's picture

@darrick

I see. So there are in fact some benefits in using FTP instead of PHP uploading. Resume should be very helpful for the end users, especially because they will be uploading movie files, which tend to be large.

And thank you very much for the detailed explanation of use case of Media Mover! I'll take a look at the module in depth.


Aki Iwata
FOREST & trees

Archive.org gave us the

kreynen's picture

Archive.org gave us the source of their Flash uploader that uses ftp. We'd really like to incorporate that into om_show in a way that dynamically creates the Media Mover ftp token and then renames the file using the token. If there are any Flash savvy developers out there that have time to work on this, let me know and I'll get you that swf source.

Sounds great

forestmars's picture

Kevin,

By coincidence I've been doing a lot of flash this week. Can't say I'm loving it, but would definitely be interested in seeing the source file. As I mentioned to you, we are interested in using Archive.org, although not sure if that will be feasible.

~ƒorest

File API

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: