Letizia Brunetti
Letizia Brunetti

Reputation: 53

Failed to create a new object in the bucket

I followed the viewer walkthrough and it works fine when I upload the "rst_basic_sample_project.rvt" provided as demo model by the guide and when I upload a small file .obj . But when I try to upload other random .ifc files (an extension included in the supported list) it stops working.

The app shows "Failed to create a new object in the bucket" and on the cmd appers "Error: Request body larger than maxBodyLength limit". The latter is thrown by the Axios library:

Error: Request body larger than maxBodyLength limit
    at RedirectableRequest.write (@myPath@\node_modules\follow-redirects\index.js:105:24)
    at RedirectableRequest.end (@myPath@\node_modules\follow-redirects\index.js:130:10)
    at dispatchHttpRequest (@myPath@\node_modules\axios\lib\adapters\http.js:234:11)
    at new Promise (<anonymous>)
    at httpAdapter (@myPath@\node_modules\axios\lib\adapters\http.js:18:10)
    at dispatchRequest (@myPath@\node_modules\axios\lib\core\dispatchRequest.js:59:10)

I expected the viewer to upload any file. Am I mistaken? Thus this mean that the viewer has a maximum capacity regarding the uploaded file dimensions? Or can it be adjusted?

Upvotes: 1

Views: 723

Answers (1)

Bryan Huang
Bryan Huang

Reputation: 5342

That's an issue with your http client Axios and not our endpoints - there's only a 5GB cap on the total size of a bucket for free trial subscription and no limit on the format/extension or size of a single object. If you attempt a translation job that's not supported our endpoint will throw corresponding errors but be sure to name your object with the right extension name that corresponds with its format - our engine identifies the format of a model by its extension name.

Upgrade your Axios client to v0.18 or above - see this issue here

And don't forget to set up your Axios config like below:

await axios({
            url: `the url`,
            'maxContentLength': Infinity,
            'maxBodyLength': Infinity
...

I've created a PR here to correct the sample code ...

Upvotes: 1

Related Questions