Currently the "Move the file directly to the final location" attach method is apparently not yet supported on Drupal 7. Is there any news on development of this feature? It would be very helpful.

Thanks

CommentFileSizeAuthor
#3 filefield_sources_move_fix.patch2.69 KBquicksketch

Comments

quicksketch’s picture

Last I looked at the problem I still didn't know how to make this possible in Drupal 7. The D7 abstraction around file handling is very convenient in a lot of places, but certain use cases (such as this) don't seem to have an immediate answer. So generally, there isn't any "news" on the development of the feature, right now I'm still trying to figure out how it would be possible. But in general terms I'm not spending a huge amount of time on FileField Sources currently (I tend to cycle through my modules an give them each dedicated attention every couple of weeks).

bluestarstudios’s picture

That makes sense. And surely let me say Thank You for taking the time to create this one. It's really helpful. I researched a lot trying to find a module that did this with such ease, but this was surely the best one out there. So thank you for that. If there's any way I can help let me know. ;)

In the meantime, do you know of any other module that does importing/attaching of files already uploaded via FTP?

quicksketch’s picture

Category: support » feature
Status: Active » Needs review
StatusFileSize
new2.69 KB

Now that I'm more familiar with Drupal 7, I've found a solution to this problem though it's not exactly pretty. The original problem (as shown in this patch's removed code) is that when you delete the file from the old location, it's no longer in the list of options in the select list. This causes Drupal's built-in validation to think that the user is trying to input an invalid file location.

We can work-around this by storing the original list of files, then checking the original list on rebuilds of the form. This patch does exactly that, and removes all the temporary TODO code.

quicksketch’s picture

Title: "Move the file directly to the final location" in D7 » Restore the "Move the file directly to the final location" feature in D7
Status: Needs review » Fixed

Committed to the 7.x branch.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.