Whenever I try to upload an image with image picker, I get the error message
Unable to create a directory structure for your images.
I can upload images manually (through file attachment) without problems. File "Download method" is set to private. Any idea what's wrong?
Comments
Comment #1
vm commentedwhere is your private directory at? is it above the public root? if not your files aren't really private. Though that is a separate issue.
consider creating the directory manually and point to it in the settings of the module itself.
I found this: http://drupal.org/node/308831
where the developer states he/she doesn't use private upload method.
Comment #2
rene_w commentedYes, my "files" directory is outside the public html root directory. I've tried to create the "imagepicker" directory manually but that didn't change anything.
I did read the mentioned post about "Private file /upload/ not supported", but it wasn't (and still isn't ;) clear to me what the connection with the private /download/ method is? As I mentioned, uploading an image (without image picker) as a simple file attachement works just fine.
Comment #3
vm commentedthe upload.module in core supports private uploads as core itself supports this feature. This would be the difference between the two I'd guess.
My best guess is that it has something to do with the path that the private method uses verses the public method as the public method is simply a link directly to the file and the private method is a link with 'system' in it which makes it harder for those to get at the files because they don't know the exact path.
Comment #4
goye2cz commentedI'm having the "Unable to create a directory structure for your images." issue as well. I have one site that seems to be without problem. It's on my local hard drive. I've backed up that website and installed it on my webhost for a couple of sites. Of course I created a new database and modified the settings.php for drupal. Everything seems to work fine except imagepicker. WHY? Has anyone found a fix for this?
Is there some code in imagepicker that makes it look on a certain file path for something that would be different if you backed it up and installed drupal in a different directory or server?
Thanks.
Comment #5
goye2cz commented*Update*
I am a noob to this but it seems that the problem is directly related to what I described, at least in my case. I did a fresh install of drupal on my web server and added image picker and it works beautifully. It does not work when I simply back up a site and move it to another location.
Any guesses on how to resolve that?
Comment #6
hutch commentedThe "Unable to create a directory structure for your images." issue is caused by bad permissions on the files folder and/or those below it. When you move a site using ftp you will inadvertently alter those permissions. You can use your ftp client to set them to 'world writeable' or whatever your software calls it.
see
http://drupal.org/node/34023
Comment #7
pyotr777 commentedHave the same problem. It doesn't have to do with permissions.
I gave full permissions to files, files/imagepicker and all folders inside it, but still have the problem.
Upload method is set to public.
Cannot find any configuration of imagepicker module.
BTW, I use Drupal 5.15.
Comment #8
goye2cz commentedJust confirming that the permissions were not the issue. The permissions were set correctly and it still did not work. I see that there is now a new version of ImagePicker. I disabled the old, uninstalled, then deleted it. I uploaded the new, enabled, and now it works fine.
Comment #9
vm commentedThus others in this thread should also update to 6.x-1.3 and reopen if the issue persists.
Comment #10
rene_w commentedMy original bug report was that Image Picker doesn't work when Drupal is configured to use the "private" file download method. This has not been "fixed" at all.
However, since there are quite a few more bug reports with the same issue #206800: Have Image Picker to work with filesystem set to private, #308831: Private file upload not supported, it probably makes sense to keep only one of them around and mark the others as duplicate.
But, at the very least, this restriction should be clearly stated on the project page and/or the readme file! Lest someone else wastes a lot of time trying to get a perfectly normal configuration to work that is known to not be supported...
Comment #11
vm commentedsince the developer responded in the thread you link to and since this thread is now cluttered ...
marking this as duplicate of: http://drupal.org/node/308831
Comment #12
hutch commented'public' files are stored under the document root of the domain concerned.
'private' files are stored outside the document root.
Therefore only public images can be accessed directly from a web page. Privately stored images would have to be accessed via a url that could interpret the request so as to open the privately stored file and stream it directly to the browser as a download, not much use for images in a webpage.
That is the reason why 'private' makes no sense for images embedded in a webpage and why it cannot be 'fixed'
I will put a note on the imagepicker page for those who do not understand these differences.
Comment #13
rene_w commentedEven with the private download method, files can be stored under the document root, so this has nothing to do with the download/upload problem.
"Therefore only public images can be accessed directly from a web page." This is utter nonsense. Images (whether directly attached to the node or stored in an Image node) can be embedded in a page with a URL (or with a filter tag) with or without using private download.
For those who do not understand these differences, I suggest having a look at the Image Assist module, which has no problem uploading or displaying images when using the "private" file system method. I use it for images on my site now, and yes, they display perfectly normal like any other web page with images...
Comment #14
abutze commentedI have the same problem.
My host is running safe_mode on. Could that be the reason why I get the error "Unable to create a directory structure for your images." ?
Comment #15
abutze commentedOkay, I've found out that this is the reason why I can't use the module.
Comment #16
imp_squared commentedAnd what was this reason why you can't use the module?