QCubed v4 plugin created for FileUpload
Many third-party plugins are difficult or inconvenient to fit for QCubed-4.
Here it was decided to build the Fileupload plugin to fit the QCubed-4 framework as much as possible. Here we
use javascript, a bit of jquery and PHP.
See FileUploadBase and UploadHandler class for usage and configuration descriptions and use cases.
Requirements
First, you must check whether the conditions are met:
- Does the "upload" directory exist in /project/assets.
- Does the "tmp" directory exist in /project.
- Please check if the constants 'APP_UPLOADS_URL', 'APP_UPLOADS_DIR', 'APP_UPLOADS_TEMP_URL', 'APP_UPLOADS_TEMP_DIR' exist in
https://github.com/qcubed-4/application/blob/master/install/project/includes/configuration/active/2directories.cfg.php#L29
One example
This is just a quick example. Language translations are intended to activate javascript language translation.
Currently, English, Estonian and Russian are available. The default language is English.
First you need to know that this plugin has been created with a specific purpose in the direction that if you
want to create a new folder in the "upload" directory. Then you must also create a folder with the same name
in the existing folders "thumbnail", "medium", "large" with exactly the same depth.
On the left is a simple and dirty example. This is to understand how to upload files to other folders in the upload
directory. First, for example, create a new folder called "test" and put the same folder in
the "upload", "thumbnail", "medium" and "large" directories. Write "test" in the text box and upload some files.
Files are uploaded to the directories "upload/test", "thumbnail/test", "medium/test" and "large/test", etc...
Note: This example uses $_SESSION. Please do not use it in session production. Development and production must
use either $_GET or $_POST data passed to options[''DestinationPath''].
Two example
The FileUpload class only deals with uploading files and does not deal with direct file deletion after uploading.
Before uploading, you can review the uploaded files again and discard some files.
For example, a file manager is suitable for managing files and creating folders.