I tried this Drag-and-Drop File uploadfrom Aaron Vanston: https://codepen.io/aaronvanston/pen/yNYOXR
It works perfectly, all until I try to post it. I put the whole thing in a <form>
tag and added a submit button, but after uploading an image and submitting it, both the $_POST
and the $_FILES
arrays are empty. I tried adding a regular file-upload input field, and that one seemed to work.
Does anyone know why the code linked above won't let me submit the file? Is there any way to fix this?
The <input>
-Tag in the codepen was missing a name
attribute. Adding it fixed it's functionality.
The Codepen contains only and solely the behaviour of the userinterface. There is no functionality implemented to send data anywhere...
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.