Releases: Rundiz/upload
Releases · Rundiz/upload
v2.0.3
v2.0.2
v2.0.1
- Change the way to set any error message into
setErrorMessage()
method. - Add
error_codes
property for use with your own translation. You can
read more description in this property for all available error code and
its translation or you can still use the olderror_messages
property.
Example for error_codes
array format.
array(
index => array(// the `index` will be the same as it is in error_messages property.
'code' => 'RDU_1',// this will be error code, start with RDU_ and follow with number or short error message without space. it is easy for check and replace with your translation.
'errorAttributes' => 'string',// this key contain error attributes as string
// for example: 9MB > 2MB in case that limit file size to 2MB but uploaded 9MB, or showing file name that have problem.
// this key may contain empty string so check it before use.
'errorFileName' => 'filename.ext',// the file name with extension that cause error message.
// this key may contain empty string.
'errorFileSize' => '12345',// the file size in bytes.
// this key may contain empty string.
'errorFileMime' => 'mime/type',// the file mime type.
// this key may contain empty string.
)
)
v2.0
Write the whole new source code.
- Upload single file or multiple files
- Validations
- allowed file extensions
- matched mime type
- max file size
- security scan
- reserved file name
- safe for web file name
- Detect the errors and tell you so you can easily to solve it.
Requirement:
- PHP 5.3+