givanz / VvvebJs

Drag and drop page builder library written in vanilla javascript without dependencies or build tools.
https://www.vvveb.com/vvvebjs/editor.html
Apache License 2.0
7.07k stars 1.62k forks source link

upload new file failed #228

Open zeln19861017 opened 2 years ago

zeln19861017 commented 2 years ago

I start use VvvebJs yesterday,when I want to upload new file, it doesn't worl.I modify the inputs.js and set my server side upload script url yet.

givanz commented 2 years ago

Hi

Upload code was added for the media modal in a previous commit, by default it uses upload.php to hande server side file saving https://github.com/givanz/VvvebJs/blob/master/libs/media/media.js#L472 to the root folder, you can edit upload.php https://github.com/givanz/VvvebJs/blob/master/upload.php#L34 to change the upload path (for example "/images") also make sure that the folder has write permission for php.