Title: error &#8211; SyntaxError: Unexpected token
Last modified: August 31, 2016

---

# error – SyntaxError: Unexpected token

 *  Resolved [And1rzej](https://wordpress.org/support/users/and1rzej/)
 * (@and1rzej)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/error-syntaxerror-unexpected-token-5/)
 * I don’t know what does mean:
 * > SyntaxError: Unexpected token
 * 1
    when I work in kokpit, it (upload) work properly
 * 2
    but when it work after logout, work from public it doesn’t work, and I see:
 * > SyntaxError: Unexpected token
 * but despite media can see in
    yoursiteroot/wp-content/uploads/4/wtf_upload_dir/
 * [https://wordpress.org/plugins/work-the-flow-file-upload/](https://wordpress.org/plugins/work-the-flow-file-upload/)

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

 *  Plugin Author [lynton_reed](https://wordpress.org/support/users/lynton_reed/)
 * (@lynton_reed)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/error-syntaxerror-unexpected-token-5/#post-7195128)
 * You well have to try and explain better please.
 * What do you mean by “work from public” ?
 * Please also post the short code you are using.
 *  Thread Starter [And1rzej](https://wordpress.org/support/users/and1rzej/)
 * (@and1rzej)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/error-syntaxerror-unexpected-token-5/#post-7195261)
 * > What do you mean by “work from public” ?
 * I think about when I want to upload files as a public user with public status,
   without logging in my WP.
 * > Please also post the short code you are using.
 * `[wtf_fu_upload]`
 * I have this option:
 *     ```
       deny_public_uploads "No" (option)
       "Restrict access to logged in users only. WARNING ! Do not uncheck this feature unless you have other 3rd party plugins that are protecting access to your pages, have implemented your own conditional logic around your embedded wtf-fu shortcodes, or you understand the risks and really do want to allow ANY user to be able to upload files to your site."
       ```
   
 *  Plugin Author [lynton_reed](https://wordpress.org/support/users/lynton_reed/)
 * (@lynton_reed)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/error-syntaxerror-unexpected-token-5/#post-7195324)
 * I just tried that here and it worked for me.
    Without being able to reproduce
   it I can only suggest a few things to try.
 * 1) Are you using the latest version of the plugin version 3.0.1 ?
 * 2) check if the wp-content/uploads/public got created
    this is the directory 
   used for public uploads. If it is not there try creating it manually.
 * 2) set use_public_dir = “yes” as well as deny_public_uploads “No”
 * As a side issue it is better to specifically assign attributes rather than change
   the global defaults unless you want to have ALL shortcode instances have this
   behavior.
 * i.e. set the default page back to use_public_dir = “no” and deny_public_uploads“
   yes” then specify these attributes in the short code like this
 * `[wtf_fu_upload deny_public_uploads="0" use_public_dir="1"]`
 * Lynton
 *  Thread Starter [And1rzej](https://wordpress.org/support/users/and1rzej/)
 * (@and1rzej)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/error-syntaxerror-unexpected-token-5/#post-7195435)
 * Tanks for reply and thank you for your patience:
 * > Are you using the latest version of the plugin version 3.0.1 ?
 * [yes, was done before]
 * > check if the wp-content/uploads/public got created
 * [yes, was done before]
 * > set use_public_dir = “yes” as well as deny_public_uploads “No”
 * [yes, was done before]
 * > As a side issue it is better to specifically assign attributes rather than 
   > change the global defaults unless you want to have ALL shortcode instances 
   > have this behavior.
   > i.e. set the default page back to use_public_dir = “no” and deny_public_uploads“
   > yes” then specify these attributes in the short code like this
 * [ I don’t understand this rule, because i think (maybe wrong) that settings may
   be only GLOBAL for every page same, does mean same rules in settings are for 
   every page on my website, so when I change attributes in settings from ‘use_public_dir
   = “yes” and deny_public_uploads “no”‘ to ‘use_public_dir = “no” and deny_public_uploads“
   yes”‘ it update in settings will be global rule for all pages ? ]
 *  Thread Starter [And1rzej](https://wordpress.org/support/users/and1rzej/)
 * (@and1rzej)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/error-syntaxerror-unexpected-token-5/#post-7195436)
 * btw
    files from upload are on ftp, but yet the error message…
 *  Plugin Author [lynton_reed](https://wordpress.org/support/users/lynton_reed/)
 * (@lynton_reed)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/error-syntaxerror-unexpected-token-5/#post-7195437)
 * Settings in setting page are global but are overridden by attributes that are
   explicitly added in the short code. Either way should work though.
 * As I can’t duplicate your problem I don’t have any thing further to suggest.
 * Maybe try switch to a different theme and see if it still occurs.
 *  Plugin Author [lynton_reed](https://wordpress.org/support/users/lynton_reed/)
 * (@lynton_reed)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/error-syntaxerror-unexpected-token-5/#post-7195448)
 * Closing this as there is nothing else I can add on this one.
    If you are still
   having issues and can provide additional information or a link to the problem
   on a live site, I can try and look further into it.

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

The topic ‘error – SyntaxError: Unexpected token’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/work-the-flow-file-upload.svg)
 * [Work The Flow File Upload](https://wordpress.org/plugins/work-the-flow-file-upload/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/work-the-flow-file-upload/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/work-the-flow-file-upload/)
 * [Active Topics](https://wordpress.org/support/plugin/work-the-flow-file-upload/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/work-the-flow-file-upload/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/work-the-flow-file-upload/reviews/)

## Tags

 * [syntaxerror](https://wordpress.org/support/topic-tag/syntaxerror/)
 * [unexpected token](https://wordpress.org/support/topic-tag/unexpected-token/)

 * 7 replies
 * 2 participants
 * Last reply from: [lynton_reed](https://wordpress.org/support/users/lynton_reed/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/error-syntaxerror-unexpected-token-5/#post-7195448)
 * Status: resolved