I wanted to know if there is a way to upload image to server from the src
of the img
tag. The src
can be an absolute path or base64 encoded string depending on some conditions.
I tried a sample application using JQuery AJAX and PHP running in wamp server. In that I am creating a form with file upload control. And posting a FormData object of the uploaded image to server. Reference: https://www.simplifiedcoding.net/php-upload-image-tutorial-using-jquery-ajax/
Now I want to upload image from src
instead of the image selected using file upload control.
Yes , You can upload base64 encoded string(src part) to the server and save it as it is or convert it into an image and save it as a file.
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.