To file a problem with blob storage Distribute large files: The fileRange method is used (nodejs Cloud function). It just sends portion of a file.
It only sends 9.7MB when we transfer a 10MB file. When transferring a 50MB file, only 49.5MB is transferred.
It contains the following problems: Range of Stack content error The length of the string must be more than zero and less than or equal to 4194304 bytes.
Snippet of code:
const fileName = path.basename('master/test/myTestXml.xml')
const fileClient = directoryClient.getFileClient(fileName);
const fileContent = await streamToString(downloadBlockBlobResponse.readableStreamBody)
await fileClient.uploadRange(fileContent, 0,fileContent.length,{
rangeSize: 50 * 1024 * 1024, // 4MB range size
parallelism: 20, // 20 concurrency
onProgress: (ev) => console.log(ev)
});
It gives an issue after uploading a partial file - any suggestions on how to transfer large files using rangeSize?
Stack: Range Error: contentLength must be greater than zero and equal to 4194304 bytes.