• Resolved mikecatz

    (@mikecatz)


    Hello support forum,

    Awesome Plugin, many many kudos!

    I have been successfully using File Away now for over a week for File Away Directory Files, and I decided to add File Uploads today.

    In the first attempt to upload a file, I accidentally picked a file with the same name as a file in the destination folder, so I got an error. All subsequent file uploads now I get the popup that shows “An error has been triggered” – even when I select unique files.
    I have tried multiple base folders that work still great with Directory Files. I even make the permissions on the folders 777 in case that was the issue – to no resolve.

    The server error_log for wp and my host do not indicate anything wrong.

    Not sure where to go from here – it seems I dorked something up.

    Any pointers appreciated.
    Thank you!

    https://www.ads-software.com/plugins/file-away/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author thomstark

    (@thomstark)

    Uploading a file with the same name as another is not a problem. It will just increment the filename with an appended number until no file by that name exists, then call it that. The error you’re getting is only triggered if the upload path contains “..” or equals “/”.

    Thread Starter mikecatz

    (@mikecatz)

    Yep, that’s it – the Site Root Directory and the WP Install Directory turn out to be the same on my server, so I put in relative paths to folders above my WordPress install folder for the Base folders (they show “/root/wp/../my_file_away_folder” – so they do dontain the “..” as you explained).

    I changed that now to real folders and it’s working just fine.

    Thank you very much for helping ??

    Plugin Author thomstark

    (@thomstark)

    No problem. This is a security feature to prevent users from using developer tools to add “..” to the path (whether with uploads, or manager mode operations), to try to manipulate directories outside of the scope established by your shortcode parameters.

    Thread Starter mikecatz

    (@mikecatz)

    Hello again Thomstark,

    In regards to what you said “Uploading a file with the same name as another is not a problem. It will just increment the filename with an appended number until no file by that name exists, then call it that.”

    Is there a way to tell File Away Upload to overwrite the file and not give it a unique name?

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘"An error has been triggered" for Add Files’ is closed to new replies.