Basic PHP file upload example using uppload.js.org JavaScript library building it via webpack.
It shows the full functionality of uppload.js.org working together with a PHP backend and allows to create your custom builds.
Using DDEV local based on Docker it is set up in five minutes on your local device.
To start with DDEV local (if not already done) please read the documentation on how install it on your OS.
Be careful using the PHP script in a production environment without knowing what you do!
It is not secured as normally needed and you should not use the PHP script as it is in a public website!
Run ddev start to start the project with DDEV local.
Run ddev npm install to install all NPM dependencies.
Run ddev npm run test to check if a build with webpack could work.
Run ddev npm run build to build the files to use in a production mode.
Run ddev npm run dev to build the files to use in a development mode.
Run project while browsing to uppload-php.ddev.site on your local machine.
The file upload.php is doing the file upload with easiest PHP functions.
The file cron.php could be used to delete all files in upload folder after x minutes.
There are different demo versions in the project:
- Image upload example with crop, resize and rotate function (language: EN)
- Image upload example with crop, resize and rotate function (language: DE)
- Image upload example with all editor functions (language: EN)
- Image upload example as inline object with crop and rotate function (language: EN)
Public demo: