You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, seems to be large .gcode files report as success, but are not visible in the snapmaker display.
anything over around 75mb seems to be a problem, not looked at the source but maybe needs to be a multipart upload
To modify the HTTPConnector to make a multipart upload instead of a single upload, you need to adjust the Upload function. Here is an example of how you can change the Upload function to use multipart upload:
This code creates a multipart writer, adds the file content to it, and sets the body of the request to the multipart data. Make sure to import the necessary packages:
import (
"bytes""mime/multipart"
)
This should enable the HTTPConnector to perform a multipart upload.
The text was updated successfully, but these errors were encountered:
Hi, seems to be large .gcode files report as success, but are not visible in the snapmaker display.
anything over around 75mb seems to be a problem, not looked at the source but maybe needs to be a multipart upload
luban uses superagent which appears to handle multipart attachments automatically, so maybe that's it?
https://github.com/Snapmaker/Luban/blob/a28dcecc6633bfb0f758b265a37978a2bb07c025/src/app/flux/machine/Server.js#L215
Copilot suggests the following:
To modify the
HTTPConnector
to make a multipart upload instead of a single upload, you need to adjust theUpload
function. Here is an example of how you can change theUpload
function to use multipart upload:This code creates a multipart writer, adds the file content to it, and sets the body of the request to the multipart data. Make sure to import the necessary packages:
This should enable the
HTTPConnector
to perform a multipart upload.The text was updated successfully, but these errors were encountered: