Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload size is getting doubled for a file selected from the tmp path #2072

Open
saberprashant opened this issue Jul 7, 2024 · 1 comment

Comments

@saberprashant
Copy link

saberprashant commented Jul 7, 2024

Version

Tell us which versions you are using:

  • react-native-image-crop-picker v0.39.0
  • react-native v0.71.4

Platform

Tell us to which platform this issue is related

  • iOS
  • Android

Expected behaviour

When selecting a file from a tmp folder and uploading it, the uploaded file's size should remain the same.

Actual behaviour

On selecting an image using openPicker or openCropper method and using the path and other data to create a formData object for the file upload, the compressed file size (say 250kB) is getting almost doubled or larger after upload (like 500 kB). But, if I select the same file, use it in POSTman, and upload it via the same API, the uploaded file size comes out to be 250kB only.

Steps to reproduce

Attachments

File from the react-native-image-crop-picker tmp folder:
image

Image object used for the formData payload:
image

Output from file upload(on the backend using s3 uploads directly without any image optimization):
image

Love react-native-image-crop-picker? Please consider supporting our collective:
👉 https://opencollective.com/react-native-image-crop-picker/donate

@nikhileupheus
Copy link

+1
Facing same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants