i need to do the exact same but send the authorization in the header, and the image data in the body of the request, instead. I'm using Swift 5, but the networking should be the same. Any modifications of the above necessary concerning the request setup?
Hello,thank you for the video But how to do if i want to upload more than 1 photo to the server? In your tutorial you can upload only 1 photo And if i choose "Upload the photo" the next photo replace the previous one Thank you
@@valeriiachernova69 No. You need to send an array of base64 string from iOS to PHP. And then on PHP side, you can loop through all (like the following): foreach ($_POST["images"] as $image) { // base64 decode code goes here }
@@valeriiachernova69 We created a separate tutorial for multiple images upload from iOS to PHP. You can follow this: adnan-tech.com/how-to-upload-single-and-multiple-images-in-ios-swift-php-and-mysql/
Hey, great video! Do you know how to get the selected image filetype? or is every decoded image a jpeg?
Hi, thank you so much for the video. I need to add some extra data to the image, like an url-.. How can I do that?
You can simply append it in the data URL, that is string.
i need to do the exact same but send the authorization in the header, and the image data in the body of the request, instead. I'm using Swift 5, but the networking should be the same. Any modifications of the above necessary concerning the request setup?
For that, you might need to use a library called Alamofire. It will be different from this tutorial.
can you do how to upload video from photos in SwiftUI ???
It is the same process.
Hello,thank you for the video
But how to do if i want to upload more than 1 photo to the server?
In your tutorial you can upload only 1 photo
And if i choose "Upload the photo" the next photo replace the previous one
Thank you
For multiple images, you need to use the following library:
github.com/B-Sides/ELCImagePickerController
@@AdnanAfzal565 And what about PHP?
I need to rewrite the whole script
@@valeriiachernova69 No. You need to send an array of base64 string from iOS to PHP. And then on PHP side, you can loop through all (like the following):
foreach ($_POST["images"] as $image)
{
// base64 decode code goes here
}
@@AdnanAfzal565 like this?
@@valeriiachernova69 We created a separate tutorial for multiple images upload from iOS to PHP. You can follow this: adnan-tech.com/how-to-upload-single-and-multiple-images-in-ios-swift-php-and-mysql/
I want to ask, How about upload image with mutlripart in swift ui
Yes, you can do that as well.