Comments (7)
It looks like the issue was half-fixed with this PR, which is merged in [email protected]. This allows us to specify a maxContentLength
option to axios, and as long as it's large enough, everything is a-okay. In my tests, I just passed the file part size as the maxContentLength
and that seemed to work.
However, it's only "half-fixed" because you need to explicitly pass maxContentLength
to axios, otherwise it will allow the internal follow-redirects
package to use the default 10MB. I found this issue which seems to identify the problem, but there hasn't been much activity on it lately.
Perhaps using the file part size as the maxContentLength
is a reasonable workaround for now?
from backblaze-b2.
I can confirm that with [email protected] it works.
from backblaze-b2.
I currently worked this around with maxContentLength: Infinity
, anyway:
- shouldn't axios fill
maxContentLength
with actual formData object size? (I'm uploading multipart files) - shouldn't axios throw error instead of returning an empty/undefined response?
Since response is undefined an interceptor like the following goes in error while trying to access statusText on undefined!
instance.interceptors.response.use(response => {
console.log(response.statusText);
return response;
}, error => {
console.error(error.response && error.response.statusText || error.response);
return error;
});
from backblaze-b2.
One way to configure maxBodyLength in axios
// Setting Global follow-redirects maxBodyLength
var followRedirects = require('follow-redirects');
followRedirects.maxBodyLength = 100 * 1024 * 1024; // 100 MB
from backblaze-b2.
#62 should fix this - allows access to the underlying axios object
from backblaze-b2.
#62 merged, fixed.
from backblaze-b2.
I can confirm here that for those of you using putFileContents having an issue here,
await client.putFileContents( globals.GLOBAL_NEXTCLOUD_FOLDER + fileName, file.buffer, {
overwrite: false,
maxContentLength: 1024 ** 3
});
from backblaze-b2.
Related Issues (20)
- Help needed with use with Typescript HOT 1
- 1.6.0 not published to npm HOT 2
- axios in package.json in npm package still 0.18 HOT 4
- Byte length not same as content-length HOT 2
- Error getting bucket: Error: Request failed with status code 401 HOT 1
- How do I upload an image? HOT 1
- How do I get the url of my uploaded image? HOT 5
- connect ECONNREFUSED 127.0.0.1:80 HOT 3
- Recommend S3 API for basic needs HOT 6
- Find specific file using b2.listFileNames return files not relevant
- LIfecicle Rules. How to set them HOT 1
- on upload progress HOT 1
- Still maintained? HOT 5
- Latest released version (1.7.0) contains Axios CVE-2023-45857
- auto refresh authorizationToken
- CORS on b2.authorize() HOT 3
- Please consider exposing/exporting types
- The retry object and retries property settings don't work at all. They have no effect whatsoever.
- Add "fileInfo" argument to startLargeFile
- b2_upload_file endpoint hangs for files over 3mb
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from backblaze-b2.