We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In react native 0.70.x app, the following code is used to upload a jpg image to OSS storage with a pre signed URL:
import ReactNativeBlobUtil from 'react-native-blob-util'; //dependency. v0.19.2 uploadToOSS : async (preSignedUrl, filePath, extension, filename) => { //filename, 23200/fxxxxx-xxxxxx.jpg, is used as object key for OSS var fileData; try { if (!preSignedUrl || !filePath || !contentTypeMap[extension]) return false; fileData = await ReactNativeBlobUtil.fs.readFile(filePath, 'base64'); const response = await ReactNativeBlobUtil.fetch('PUT', preSignedUrl, fileData); <<==throw exceed range error for a 84KB jpg image console.log("respnose in uploadtooss : ", response); if (response.ok) { //fetch successful return true; } else { return false; }; } catch (err) { console.log("upload to OSS failed : ", err); return false; };
},
The text was updated successfully, but these errors were encountered:
does that happen every time? And please try the newest version. I'm wondering if that has to do with some dirty buffers that got fixed already.
Sorry, something went wrong.
No branches or pull requests
In react native 0.70.x app, the following code is used to upload a jpg image to OSS storage with a pre signed URL:
},
The text was updated successfully, but these errors were encountered: