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
If you try to use this client to upload a file you will see the next error:
https://github.com/uploadcare/uploadcare-upload-client/blob/9abd0b059ce90e20e044d471625d55fa5e28527d/src/uploadFile/index.ts#L168
So, I have to use a hack to upload file
import defaultSettings from '@uploadcare/upload-client/lib/defaultSettings'; import upload from '@uploadcare/upload-client/lib/uploadFile'; const populateOptionsWithSettings = (options) => ({ ...defaultSettings, publicKey: 'XXXXX', ...options, }); export const uploadFile = ({ size, name, type, uri }, options) => upload({ name, size, type, uri }, populateOptionsWithSettings(options));
The text was updated successfully, but these errors were encountered:
Hey @retyui Thanks for report.
With such input file format, we can't slice it into chunks to upload multipart. It's better to convert it to the Blob like this:
const resp = await fetch(uri); const blob = await resp.blob();
But for now, direct uploads does not support react-native Blobs. It will be fixed by #307
Sorry, something went wrong.
nd0ut
No branches or pull requests
If you try to use this client to upload a file you will see the next error:
https://github.com/uploadcare/uploadcare-upload-client/blob/9abd0b059ce90e20e044d471625d55fa5e28527d/src/uploadFile/index.ts#L168
So, I have to use a hack to upload file
The text was updated successfully, but these errors were encountered: