IOS posts empty image using mulitpart
See original GitHub issueI have been struggling with this for last 1 week.
This is what I pass to plugin:
[{"name":"IMG_0791.JPG","filename":"file:///var/mobile/Media/DCIM/100APPLE/IMG_0791.JPG","mimeType":"image/jpg"}]
Plugin creates some temporary file and uploads that. and after uploading to my server the file created is empty which my server further uploads to S3 bucket. this is what uploaded to S3:
https://s3.eu-central-1.amazonaws.com/bolgameshow/b72e2a18-fcd2-4b45-8d5f-f5752c3482b5_IMG_0791.JPG
Whereas Android is posting file perfectly fine.
Issue Analytics
- State:
- Created 6 years ago
- Comments:14 (4 by maintainers)
Top Results From Across the Web
Upload image with multipart form-data iOS in Swift
No Need to use any library for upload images using multipart request. Swift 4.2 func uploadImage(paramName: String, fileName: String, image: UIImage) { let ......
Read more >upload a photo using request.httpM… | Apple Developer Forums
Hi, is there any way to possible upload an image using request.httpMethod = "FILES". so i have this code for Select the photo...
Read more >Upload Image To Server Using multipart/form-data in iOS Swift
Multipart /form-data is mostly used to upload images and videos to the server. This section we will see about how to upload image...
Read more >$_FILES - Manual - PHP
see http://php.net/manual/en/features.file-upload.post-method.php for ... If $_FILES is empty, even when uploading, try adding enctype="multipart/form-data" ...
Read more >[Solved]-iOS upload image php return empty - appsloveworld
Try upload image using below my code snippet . NSMutableURLRequest *request = [[AFHTTPRequestSerializer serializer] multipartFormRequestWithMethod:@"POST" ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I see from https://github.com/mrazahasan/imagePicker/blob/2b51e8eb5c1dfe7b72e55faebd6a7cdddcb2ecb5/app/item/items.component.ts that you have been able to solve this on your own, so I will close this issue.
The first image is of emulator and 2nd of real device