Options

The easiest way to use the file viewer of WordPress File Upload plugin is to put the shortcode [wordpress_file_upload_browser] in the page. In this case, the plugin will use the default functionality.

For configuring the file viewer, use the Shortcode Composer, as shown in this guide. The Shortcode Composer works for both shortcodes of the plugin, the upload form and the file viewer.

The following table contains all Shortcode Composer options of the file viewer, together with usage instructions. The corresponding shortcode attribute for each option is also included in blue small letters below the option name.

General Attributes
Basic Functionalities
Browser ID
browserid
This is the ID of every instance of the file list inside the same page. Valid values are 1,2,3… Please use a different value for every instance.
Sortable Columns
sortable
If set to “true”, the file list is sortable. By pressing on the title of every column, the list is sorted based on that column. The list is initially sorted in ascending order. If the same column title is pressed twice, the list will be sorted in descending order. Default value is “true”.
Pagination
pagination
If activated then only certain number of files will be displayed at a time, as defined by pagerows attribute. A navigation bar at the top of the file list will allow the user to scroll between pages. Default value is “true”.
Rows per Page
pagerows
It defines the number of files that will be displayed at a time if pagination is enabled.
Bulk Actions
bulkactions
If activated then a selection checkbox will appear next to each file so that bulk actions on multiple files can be performed. For the moment the only bulk action supported is deletion of files. Default value is true.
Reload on Update
reloadonupdate
If activated then the browser will be forced to reload when a change happens (resorting, change of page or deletion of file). This is especially useful when the file browser contains too many files. Default value is false.
Permissions
Browser Roles
browserrole
This is the role that is allowed to view the file list. Multiple selections can be made, separated by comma(,). If ‘all’ is set, then all logged users can view the list. If ‘guests’ is set, then guests (not logged users) can also view the list. Default value is ‘all,guests’.
Browser Users
browseruser
It defines the user (or users) allowed to view the file list. Default user is ‘all,guests. If you set a specific user, like ‘nick’, then only the user with that username will be able to view the file list. More than one users can be defined, separated by comma, e.g. ‘nick,john’. If ‘all’ is set, then all logged users can view the list. If ‘guests’ is set, then guests (not logged users) can also view the list. Default value is ‘all,guests’.
Can Download
candownload
If set to “true”, the files in the file list can be downloaded. Default value is “false”.
Can Delete
candelete
If set to “true”, the files in the file list can be deleted. Default value is “false”.
Who Can Delete
whodelete
By default only the user who uploaded a file is allowed to delete the file (and the administrators), provided that Can Delete option is activated. If it is set to ‘all’, then all users who can view the files can also delete them. Default value is ‘uploader’.
Strict Mode
deletestrictmode
If deletion is enabled then the delete link shows up on all files by default even if the user is not allowed to delete files of other users. If this option is activated then the delete link will not show up on files that the user cannot delete.
Browser Design
Browser Columns
columns
It defines the columns and their order that are shown in the file list. Seven (7) columns are available: inc for the increment column, file for the file name column, date for the upload date column, size for the file size column, user for the username column of the user who uploaded the file, post for page or post title column from which the file was uploaded and fields for the associated user fields (if exist) column. The columns are separated by comma. The default value is “inc,file,date”.
Thumbnail Size
thumbsize
The size of the thumbnails in Thumbnail column.
Filters
File List Filters
Filter by Role
rolefilter
It defines the categories (roles) of users whose files will be included in the list. Multiple selections can be made. If ‘all’ is set, then files from all logged users will be included in the list. If ‘guests’ is added, then files from guests (not logged users) will also be included in the list. Default value is ‘all,guests’.
Filter by User
userfilter
It defines the users whose files will be included in the list. Multiple selections can be made. If ‘current’ is set, then only the files of the current user will be included in the list. If ‘all’ is set, then files from all logged users will be included in the list. If ‘guests’ is added, then files from guests (not logged users) will also be included in the list. Default value is ‘current’.
File Size Larger Than
minsizefilter
It defines the minimum size that the files must have. Only files above this limit will be included in the list. Default value is empty value (no limit).
File Size Smaller Than
maxsizefilter
It defines the maximum size that the files must have. Only files below this limit will be included in the list. Default value is empty value (no limit).
File Upload Date After
fromdatefilter
It defines the earliest upload date of the files. Only files uploaded after this date will be included in the list. Default value is empty value (no limit).
File Upload Date Before
todatefilter
It defines the latest upload date of the files. Only files uploaded before this date will be included in the list. Default value is empty value (no limit).
Filter by Extension
patternfilter
It defines filtering depending on the pattern of the filename. The filter follows the wildcard syntax and one simple usage is to filter files depending on their extension, e.g. ‘*.ext’. For more powerful filtering (e.g. filtering by multiple extensions), regular expressions are supported by prepending ‘regex:’ keyword, e.g. ‘regex:\\.(ext1|ext2|ext3)$’ will allow only files that have the extension either ‘ext1’ or ‘ext2’ or ‘ext3’.
Filter by Post / Page
postfilter
It defines the post or page id from where files were uploaded. Only files uploaded from these posts or pages will be included in the list. Multiple pages or post can be defined. If ‘current’ is set, then only files uploaded from the current page or post will be included in the list. If ‘allpage’ or ‘allpost’ is added, then all pages or all posts will be included. If ‘all’ is set, then all pages and all posts will be selected. Default value is ‘all’.
Filter by Blog
blogfilter
This attribute is available only for multi-site installations. It defines the blog id from where files were uploaded. Only files uploaded from this blog will be included in the list. Multiple blogs (sites) can be defined. If ‘current’ is set, then only files uploaded from the current blog will be included in the list. If ‘all’ is set, then all blogs will be selected. Default value is ‘current’.
Filter by User Fields
userdatafilter
It defines criteria for user data fields. Only uploaded files having additional data matching these criteria will be included in the list. It has the following format:

field:field_name;criterion:comparison_criterion;value:field_value

where comparison_criterion can be any of these: equal to, starts with, ends with, contains, not equal to, does not start with, does not end with, does not contain

e.g. if set to ‘field:Your email;criterion:ends with;value:domail.com’ then only the files having user data, where the value of the field ‘Your email’ ends with ‘domain.com’ will be included in the list.

Labels
Browser Column Titles
Increment Column
inctitle
The title of the increment column. Default value is “#”.
File Column
filetitle
The title of the file name column. Default value is “File”.
Uploaded Date Column
datetitle
The title of the uploaded date column. Default value is “Date”.
Size Column
sizetitle
The title of the file size column. Default value is “Size”.
User Column
usertitle
The title of the file user column. Default value is “User”.
Post/Page Column
posttitle
The title of the post/page column. Default value is “Page”.
User Fields Column
fieldstitle
The title of the associated user fields column. Default value is “Fields”.
Browser Labels
Download Link Label
downloadlabel
This is the caption of the download link, shown below the file name if download is activated. Default value is “Download”.
Delete Link Label
deletelabel
This is the caption of the delete link, shown below the file name if delete is activated. Default value is “Delete”.
Download Link Title
downloadtitle
This is the hint shown when the user puts the mouse over the download link. Default value is “Download this file”.
Delete Link Title
deletetitle
This is the hint shown when the user puts the mouse over the delete link. Default value is “Delete this file”.
Sort Link Title
sorttitle
This is the hint shown when the file list is sortable and the user puts the mouse over the heading link of a sortable column. Default value is “Sort list based on this column”.
Guest Username
guesttitle
This is the title of the guest user, shown in the Users column when a file has been uploaded by a guest (not-logged) user. Default value is “guest”.
Unknown Username
unknowntitle
This is the title of the unknown user, shown in the Users column when a file has been uploaded by a user than no longer exists. Default value is “unknown”.
Custom CSS
Advanced Customization of Appearance
Custom CSS Editor
browsercss
It defines custom css to style the elements of the browser in a more advanced way. A delicate css editor is included inside Shortcode Composer.

Examples

You can use any of these attributes to customize the plugin. The way to use these attributes is the following:

[wordpress_file_upload_browser attribute1=value1 attribute2=value2]

Here are some examples:

[wordpress_file_upload_browser candownload="true" candelete="true" columns="inc,file,date,fields"]