question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IOS posts empty image using mulitpart

See original GitHub issue

I 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:closed
  • Created 6 years ago
  • Comments:14 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
linicommented, Dec 6, 2017

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.

0reactions
Sharique-Hasancommented, Dec 2, 2017

The first image is of emulator and 2nd of real device

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found