• Resolved charlesdunworth

    (@charlesdunworth)


    Hi files are not uploading. I employ the following shortcode using the do_shortcode method in a template file.

    [wordpress_file_upload singlebutton=”true” uploadpath=”..comp_upload/’.$slug.’/%username%” uploadrole=”administrator,editor,author,contributor” createpath=”true” forcefilename=”true” duplicatespolicy=”maintain both” adminmessages=”true” uploadtitle=”Upload Images” postlink=”false”]

    When logged in as admin I get the notice “file uploaded successfully but with warnings” when as contributor it says “file upload successful”. But either way the file is not in the folder – although the appropriate folder is created.

    So far this is only in local development (MAMP with php7.1) and I only have the free version, for evaluation. I intend to use the pro version as I need the file viewer functionality – but can’t go any further without it actually working.

    If I inspect the wp debug log I see a few lines of errors like…

    Illegal string offset ‘uploaded’ in …/wp-content/plugins/wp-file-upload/lib/wfu_io.php on line 123

    Any ideas?

    Hopefully

    Andrew

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author nickboss

    (@nickboss)

    Hi Andrew, what happens if you do uploadpath like this: uploadpath=”../comp_upload/’.$slug.’/%username%”

    Regarding the illegal string error, I suppose this is a warning. It does not affect the upload but it is a small bug. I will correct it in the next version.

    Regards

    Nickolas

    Thread Starter charlesdunworth

    (@charlesdunworth)

    Ha yes of course that works! Sorry to have wasted your time Nicholas.

    Great plugin this.

    Andrew

    Plugin Author nickboss

    (@nickboss)

    No problem

    Regards

    Nickolas

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘File upload fails’ is closed to new replies.