To start using the file upload functionality use:
Upload to single folder:
Select folder to upload to:
wpmedia_upload folder="client 1, client 2, client 3"
The wps3files_upload shortcode supports several options:
- Root (if allowed globally)
- Single Folder
- Comma Separated List of Folders (displays a folder picker)
- Any Folder (displays a folder picker), only allows root if globally allowed
If the folder parameter is empty, you will be asked to choose the folder from a popup when you upload a file. If you want to limit the restriction to a select number of folders, you can add these in a comma separated list.
|folder||folder="your-folder/your-subfolder"||upload to a single folder|
|folder||folder="folder1, folder 2"||select which folder to upload to|
|folder||folder="root"||upload to the root folder, only permitted if allowed globally in plugin settings|
|comments||comments=enabled||optional field to allow comments on uploads. must be enabled in Settings|
Allow Front-End File Uploads
You must enable the "Allow front-end file uploads" option in Settings in order to the upload functionality. This also requires the following 2 lines to be added to your CORS policy in S3.
Login to S3 Console, click on your bucket and then -> Permissions -> CORS Configuration, and add:
Allowed File Types
Allowed upload file types (comma-separated) should be configured on the settings page e.g.e.g. png,PNG. If you do not specify any upload file types then none are allowed.
Users will see this error message:
"Sorry, you can't upload that kind of file. You can only add files of this type: No file types defined in settings."
Note: This setting does not affect backend file upload via wp-admin where any file type can be uploaded.
Allow Comments on File Uploads
For comments to be allowed the 'Allow comments on file uploads' settings must be enabled in the global plugins settings AND the comments=enabled parameter above must be set in the shortcode. Comments on uploads will not work without both of these set.