I was curious if there was a way to (via a module or otherwise) use an existing attached file from an existing node and attach it to a newly created node?

Example. I've created a node called "My Move" where I've attached a file called "mymovie.flv" to it. A couple days later, I create a new node "My Resume" and I want to attach "mymovie.flv" (the same one from the first node) to it.

By reattaching, it creates a duplicate in the file system to keep them separate. Is there a way to either not have it rename, or to be able to choose a file from the system?

Thanks.

Comments

vulzan’s picture

I have the same question and am quite surprised there isnt more information on this subject. It sounds like a very simple request that should have a more elegant solution then downloading the existing file, deleting it from drupal, then uploading the same file to another node. Am I missing something? Is there a module or process or hack or anything better then just downloading the file and re-uploading?

egbertb’s picture

You could try if this one works for you.

http://drupalmodules.com/module/web-file-manager

Checking it out myself at the moment. I need something similar but integrated with O groups.

Egbert - webdevelopment and implementation - www.overboord.nl

Eland’s picture

  • File import module is great. It allows to attach files from a certain directory on the server to nodes (the files appear as usual file attachments). Multiple files can be attached at once to different nodes. I think it's great if you want to avoid uploading files through web interface.
  • Filefield_sources module seems to solve the problem (requires FileField CCK module).
    I haven't tried it myself, but I feel it will be very useful.
wolf_22’s picture

I have to take back what I said about FileField_Sources... The main developer managed to come up with a patch that handles referencing existing files without appending _N to the names.

Go with FileField_Sources.
Here's the link to the page that has the patch (look at #12): https://drupal.org/node/1492374