Questions and discussions about using the Shopify CLI and Shopify-built libraries.
Got this error: Content-length smaller than lower bound on range, while clling POST api after stagedUpload for video file.
- i am making post call using axios from node js to upload video file using policy, signature,key and googleAccessId.
- please let me know that do i need to pass blob or base64or utf8 data.
const bodyData = new FormData() stagedVideoData.parameters.forEach(element => { bodyData.append(element.name, element.value) }); bodyData.append("file", JSON.stringify(video)) // POST call for file upload await axios.post(stagedVideoData.url, bodyData) .then(data => {uploadVideo = data console.log(data, "data inside then"); }) .catch(error => { console.log("=======", Object.keys(error),error['response']['data'], "========="); })
- here i am passing multer parsed file into form data as file.
please provide your suggestions.
Thanks
Nikunj