【发布时间】:2019-09-03 04:16:48
【问题描述】:
如果我需要使用react-native-image-picker 上传的图像有任何大小限制,我想这样做。因为当我尝试上传大小为 33MB 的 jpg 图像时,应用程序崩溃并显示“appName 已停止工作”。但同时我可以上传 1MB+ 大小的 png、jpeg、jpg 等扩展图片。
ImagePicker.launchImageLibrary(options, response => {
console.log("oooooooooo", response);
if (response.didCancel) {
this.refs.toast.show(Strings.string_image_cancelled);
} else (response.error) {
console.log("ImagePicker Error: ", response.error);
}
看,当我尝试上传那个大文件时,我没有收到任何响应。但这在 iOS 上运行良好。
【问题讨论】:
-
控制台中是否有堆栈跟踪或任何输出可以添加到此问题中?
-
我已经更新了问题,请检查代码。
-
添加了一个选项 {nodata: true} 。
标签: react-native react-native-android react-native-image-picker