ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Upload directory strangeness

September 17, 2007 6:58am

Subscribe [1]
  • #1 / Sep 17, 2007 6:58am

    wice

    23 posts

    Hello,

    In my web root I created a directory called upload_directories, where I created a few other directories called logos, documents, etc:

    upload_directories/ --
                          |
                          logos/
                          documents/

    The permissions are

    drwxrwxrwx   6 www-data root   4096 Sep 17 11:49 upload_directories
    drwxrwxrwx  2 www-data root      4096 Sep 17 11:27 documents

    so there should be no problems with permissions.

    Then I created corresponding upload directories in EE, double checking ‘Server Path to Upload Directory’.

    Now, when I try to upload file called Dana.gif to upload direcory ‘logos’, the file upload dialog gives me a notice that the file has been uploaded successfully, but nothing is placed into upload_directories/logos. Instead, I see a new file in upload_directories/ called ‘logosDana.gif’ :

    drwxrwxrwx  2 www-data root      4096 Sep 17 11:27 documents
    drwxrwxrwx  2 www-data    10670  4096 Sep 12 11:22 logos
    -rwxrwxrwx  1 www-data www-data  5201 Sep 17 11:21 logosDana.gif

    And of course, when I try to view the contents of the logos directory via the file upload dialog, there’s nothing there.

    Can anyone give me a hint whats wrong?

    I am running ExpressionEngine 1.6.0, build 20070726

  • #2 / Sep 17, 2007 10:04am

    Robin Sowell

    13255 posts

    Hm- triple check the path and url settings for the ‘logo’ upload destination settings.  Then try another upload- and again triple check that you’re uploading to the ‘logo’ directory.

    If that doesn’t do it- do you have MSM installed- and any extensions that might be affecting things?

  • #3 / Sep 17, 2007 10:18am

    wice

    23 posts

    Ok, the reason is absence of the trailing ‘/’, that is, if the path is /dir1/dir2, file ‘MyFile.jpg’ is stored as /dir1/dir2MyFile.jpg

    I think the contents of this field should be considered a directory name and the trailing slash should be added if missing.

  • #4 / Sep 17, 2007 10:25am

    Robin Sowell

    13255 posts

    Aha- yep, that would do it.  Though I wouldn’t have expected the behavior.  You might put in a feature request on this one- and I’ll give the developers a ‘heads up’ on the thread as well.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases