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.

invalid_filename via file manager sync

May 09, 2012 5:14pm

Subscribe [3]
  • #1 / May 09, 2012 5:14pm

    Natetronn

    161 posts

    Any idea what would cause all the images in the file manager, when syncing, to show up as an error like the following:

    myimage1.jpg: invalid_filename
    myimage2.png: invalid_filename
    myimage3.jpg: invalid_filename

     

  • #2 / May 10, 2012 3:42pm

    Shane Eckert

    7174 posts

    Hello Natetronn,

    Thank you for posting your question here on the ExpressionEngine forums.

    What version of ExpressionEngine are you currently running?

    Are you using any Add-Ons that deal with files or images?

    Can you check the file perms on those files?

    What is the end result, do the files sync or just error out?

    Please let me know.

    Thank you,

  • #3 / May 14, 2012 3:55pm

    Casey Reid

    82 posts

    I’m having this same issue after upgrading to 2.5. All file permissions are correct. Whenever I try to sync a file directory in the control panel I get the invalid_filename error for all files in the directory.

  • #4 / May 14, 2012 4:20pm

    Natetronn

    161 posts

    Thanks for the reply Shane!

    I know my original support request was lacking info required for you to answer though, I thought I would ask “quick like” if anyone else ran into the issue hoping I would get lucky.

    Anyhow, I need to set this up locally so I can start the process of elimination & I had to put this on the back burner and I won’t get to it for quite a few hours. I know Casey is following so, I will post again ASAP on this.

  • #5 / May 14, 2012 10:14pm

    Casey Reid

    82 posts

    I resolved my issue. In my case I was using the config file options for setting file upload preferences and I did not have a trailing slash on the server path. I had it like this:

    1 => array(
              'server_path' => $base_path . '/uploads/pages',
              'url'         => $base_url  . '/uploads/pages/'
          ),

    instead of this:

    1 => array(
              'server_path' => $base_path . '/uploads/pages/',
              'url'         => $base_url  . '/uploads/pages/'
          ),

    Adding that trailing slash allowed my files to sync and thumbnails to be generated.

  • #6 / May 15, 2012 4:01pm

    Shane Eckert

    7174 posts

    Hello Casey,

    Thank you for letting us know! Nice catch!

    Hey Natetronn - let me know how things are going when you get a chance!

    Cheers,

  • #7 / May 27, 2012 4:40pm

    Natetronn

    161 posts

    Sorry about the late response on this and @Casey I apologize for not recommending that as Adrienne had mentioned it in help chat but, I had forgotten to mention it here.

    Apparently I had two issues, one was the forward slash like Casey pointed out and the other issue is a back slash issue on a Windows local dev server.

    I’ve “solved” the back slash issue with the following though, I don’t know if this is the best way to do this or not. It seems to work yet, I’m hoping for some guidance if possible?

    $slash_type = (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') ? '\\' : '/'; 
     $config['upload_preferences'] = array(
      3 => array(
        'name'        => 'Thumbnails',
        'server_path' => $images_path . $slash_type. 'uploads' . $slash_type . 'thumbnails/',
        'url'         => $images_url  . '/uploads/thumbnails/'
      )
     );

    Thanks

  • #8 / May 30, 2012 4:28pm

    Shane Eckert

    7174 posts

    Hey Natetronn,

    I have seen this issue every now and then and when it’s resolved, I have yet to see how it was done.

    Your solution looks nice, I would stick with it.

    Cheers,

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

ExpressionEngine News!

#eecms, #events, #releases