Needs work
Project:
FileField Sources
Version:
7.x-1.x-dev
Component:
Source: Attach (FTP)
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
25 Jul 2011 at 13:40 UTC
Updated:
3 Jun 2016 at 21:40 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
recrit commentedThe attached patch removes the argument from file_default_scheme().
Comment #2
quicksketchSeems like the scheme should be used no matter what and we should just drop the use of file_default_scheme() and keep the scheme variable.
Comment #3
recrit commented@quicksketch: that could be better b/c if you're using some other protected directory, you'd specify with absolute path. So this case is really for the option of "within the files directory" and for the case of private, you'd definitely want to be uploading to private. It just seems in that case you would use the absolute path and then on the copy the new file gets private scheme.
Comment #4
quicksketchFor now I've committed #1. No API change or updates needed in this situation.
Comment #6
j.somers commentedI'm opening this issue again because I'm bumping into this.
I want my file_attach location to be within the private directory. Together with the patch from #1492374: Attach source reference existing file where it's the same as source I want to bypass the PHP and MySQL timeout that gets triggered on shared hosting solutions when working with very large files. (500MB and up)
This of course works for files in the public directory, but doesn't for files within the private directory because the file attach source location will always be relative to the public files folder.
I'm curious about why the
$field['settings']['uri_scheme']option was not used instead of the call tofile_default_scheme(). Shouldn't it simply be better?On a side-note: the call to
$field = field_info_field($instance['field_name']);is still present, but the$fieldvariable is not used, so that should have been removed too. :-)Comment #7
quicksketchHappy to review patches. ;)