简体   繁体   中英

Issues | How to transfer big file ccv2 blob storage to blob fileshare using azCopy using nodejs cloud function

I am trying to transfer big files (of size 50MB, 100MB or more than that). I wrote a nodejs cloud function - using/implementing azCopy command.

Issue: while transferring its giving error: Exception: TypeError: Cannot read property 'fromTo' of undefined How to give this option in code, is there any way to transfer big files from storage to fileshare.

Code snippet:

#copy function
context.log('start copy -------------');
var destination = 'https://<>.file.core.windows.net/testsftpshare/MyTest/test?sv=<>&ss=f&srt=sco&sp=rwlc&se=<>&st=<>&spr=https&sig=<>';
context.log('start copy dst defined-------------');
var jobId = await client.copy(fileFullName, dst);
context.log('jobid -------------',jobId);

var status;
// You use this job ID to check on the progress of your job, and know if it has finished.
context.log('start while loop------------');
while (!status || status.StatusType !== "EndOfJob") {
     var jobInfo = await copyClient.getJobInfo(jobId)
     status = jobInfo.latestStatus;
     await new Promise((resolve, reject) => setTimeout(resolve, 1000));
}
context.log('Create file ${fileName} successfully');

Error at line: var jobId = await client.copy(fileFullName, dst); Error: Exception: TypeError: Cannot read property 'fromTo' of undefined

If AzCopy is not necessary for you, I think this post could also resolve this issue as a workaround.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM