-
Notifications
You must be signed in to change notification settings - Fork 104
asyncUpload method can't find the file path #83
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
Comments
I also have this problem, saying that there is no such file, but the path of the error prompt is not my path at all |
I tried to look at the logic of the source code and found the wrong location,but I didn't go into the reasons. The method is as follows: ` public void asyncUpload(final ReactContext context, String bucketName, String ossFile, String sourceFile, ReadableMap options, final Promise promise) {
// |
I have try this way and it's work! |
@luozhang002
when I use asyncUpload method to upload image to oss, I get the below error:
err Error: /storage/emulated/0/c9ce6f70-f5cf-4086-aac6-2023d39c5986.jpg: open failed: ENOENT (No such file or directory)
[ErrorMessage]: /storage/emulated/0/c9ce6f70-f5cf-4086-aac6-2023d39c5986.jpg: open failed: ENOENT (No such file or directory)
at Object.fn [as asyncUpload] (NativeModules.js:99)
at Object.asyncUpload (index.js:74)
at _callee2$ (VM5 face_detection_sign.bundle:169)
at tryCatch (runtime.js:63)
at Generator.invoke [as _invoke] (runtime.js:293)
at Generator.next (runtime.js:118)
at tryCatch (runtime.js:63)
at invoke (runtime.js:154)
at runtime.js:164
at tryCallOne (core.js:37)
my local image uri: "file:///data/user/0/com.mysoft.yunke.msdjdev/cache/Camera/c9ce6f70-f5cf-4086-aac6-2023d39c5986.jpg"
why can't find the image file and oss read the file path maybe wrong.
I can find the file in android studio
info:
android 10
react-native 0.61
aliyun-oss-react-native latest version
The text was updated successfully, but these errors were encountered: