Add files to file system (as attachments) without uploading?

jppi_Stu - March 19, 2008 - 02:24

On an existing non-Drupal site, I regularly post video files for clients to download. These are typically in the 40-60MB range, sometimes larger. I want to move this file delivery process into a new Drupal-based "client extranet" which uses the private download option. Currently the system is set up to limit uploads to 4MB. Rather than reconfigure that limitation (if it's even possible in my situation), I'd rather find a way to "attach" a file just like an uploaded file would be, but with the actual file transfer being done outside of Drupal (e.g., FTP to the relevant file storage location).

Is this possible? If so, how would I go about it? I did some searching here but didn't find anything relevant to this, I just found info about increasing the upload limit beyond 4MB.

A related question would be if I upload a file attached to node (n), and I also want that file listed on node (x) but of course I only want one copy on the server, is that possible? I might want to do this, and it might also be relevant to my main question above if there's a way to add "attachments" to a node without uploading directly to that node.

Me too

lpkb - March 27, 2008 - 15:31

I'm interested in this as well, but I don't have any answers for you... I'm subscribing here in case anyone has suggestions.

Interesting concept

nicholasbarcomb - March 27, 2008 - 16:55

Here is a solution, you can setup a directory in your ftp like so: public_html/sharedvideos and upload your video directly to this using an ftp client, like Cyberduck or Cute ftp. You can also go into your cPanel and add new ftp accounts for other users to upload their videos.

So say you made your public_html/sharedvideos directory and you uploaded a video called panda.mov. Within your node you would just need to reference the URL to get the this movie: www.mysite.com/sharedvideos/panda.mov. A user clicks on it and the movie opens in Quicktime in their browser. Or you could have it be a zipped file for them to download. If the user has ftp access they can download the file straight from the directory. And the nice thing about this is any unauthorized/nonpermitted user will receive an Access Denied screen if they try to type in www.mysite.com/sharedvideos/panda.

Here's an example from my site www.nbarcomb.org/video/demoreel3ds.mov

You can also setup an in-site ftp accessor like IMCE http://drupal.org/project/imce which allows you to dynamically have Drupal setup directory folders for new users and allow them to upload to their folder or use Filebrowser http://drupal.org/project/filebrowser which lets you expose a part of your filing system. Though i'm not really sure the upload download limitation. The way described above would be the quickest and easiest solution.

Hope this was helpful
-Nick

Need files to be out of public_html

jppi_Stu - April 3, 2008 - 09:54

Thanks for the input, Nick. Unfortunately, the solution I am seeking is one where the file download method is Private and the files themselves do not reside in a directory that the Web server can access -- in other words, they're not under public_html but are elsewhere on the server. Your method does not force Drupal to handle file delivery, which is a restriction I want to put on these files. Otherwise, somebody with the URL for a video file can access it directly, like how I watched your example just by clicking the link, without logging in to your site.

The trick is not how to get the files to the server; the trick is attaching them to nodes when Drupal is using the Private file download method.

 
 

Drupal is a registered trademark of Dries Buytaert.