react-native-image-crop-picker
                                
                                 react-native-image-crop-picker copied to clipboard
                                
                                    react-native-image-crop-picker copied to clipboard
                            
                            
                            
                        Unable to upload image to backend server
Version
Tell us which versions you are using:
- react-native-image-crop-picker v0.38.0
- react-native v0.69
Platform
- iOS
- Android
Expected behaviour
I want to upload the image and receive a secure url
Actual behaviour
I always get a 400 error which says invalid file type. NB: I have tried both axios and fetch and tried alot of solutions seen, but none seem to work. any help will be greatly associated.
 
 
                                    
                                    
                                    
                                
Any solution for this? Facing the same, It's working fine on ios but cannot upload to the server on Android.
I wasn’t able to get it to work on either. can you share your code snippet? android uri is different, also it doesn’t come with filename
Any update on this?
Fixed.... For my case, the file name wasn't having an extension.
Hey guys, I had to upload base64 string, albeit a 0.33 increase in size
fromData.append("file", { name:fileName, type: ImageOrVideo.mime, uri: Platform.OS === "android" ? ImageOrVideo.path : ImageOrVideo.path.replace("file://", "") });
headers: { "x-access-token":AppGlobal.auth_token.accessToken, "Content-Type": "multipart/form-data", Accept: "application/json", }
I am unable to upload image back end server Flask (python) any one help on this thanks in advance