Description
The File Upload Administration plugin allows you to upload files to your blog as well as delete files that you have uploaded to your blog. This means you can add images or sound files to your blog that can be displayed in entries.
Installation and Setup
In your global /WEB-INF/plugin.properties file, add the following line:
file-upload=org.blojsom.plugin.admin.FileUploadPlugin
The File Upload plugin has its own configuration file, plugin-admin-upload.properties, that is referenced from an initialization parameter in the /WEB-INF/web.xml file.
<init-param>
<param-name>plugin-admin-upload</param-name>
<param-value>/WEB-INF/plugin-admin-upload.properties</param-value>
</init-param>
The contents of this file will be similar to the following:
temporary-directory=/tmp
maximum-upload-size=100000
maximum-memory-size=50000
accepted-file-types=image/jpeg, image/gif, image/png
invalid-file-extensions=.jsp, .jspf, .jspi, .php, .cgi
| Property |
Description |
| temporary-directory |
Should be set to a temporary directory. It is used when an upload file is too large to fit into memory. |
| maximum-upload-size |
Is the maximum allowable size in bytes for files that are uploaded to any blog. |
| maximum-memory-size |
Is the maximum allowable size of files that should be kept in memory. Files exceeding this size will be written to the temporary directory before being written to the proper resources directory for the individual user. |
| accepted-file-types |
Is a comma-separated list of allowed MIME types for file uploads. |
| invalid-file-extensions |
Is a comma-separated list of file extensions that are not allowed to be uploaded. |
Required Permissions
A user must have the following permissions in order to use this plugin.
file_upload
Usage
After logging into the administration console, you may click on the link to "Upload Files" and you will be able upload and delete existing files from your blog.
Feature request: to have resources-directory to be created outside the directory where blojsom is installed.