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
Above is my code, instead of download the file, the browser directly open the file.
I google a lot recently, it may caused by fetching file from serverurl not localhost.
But i can not find any way to fix this.
Can anyone take a look and help about this issue?
The text was updated successfully, but these errors were encountered:
Hi am not an expert but you probably provide a link in the wrong way:
It should be full URL where the browser automatically sets the correct Content-Type headers saveAs( "https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg", "cat.jpeg" );
Or wrap it to blob/file var blob = new Blob(["some text"], { type: "text/plain;charset=utf-8;", }); saveAs(blob, "thing.txt");
const saveFolder = () => {
FileSaver.saveAs(
'serverurl/proj/otbstorage/logs/sched-432cc428-ddae-11ed-bad5-662cc6ee3b0c/mb_output_ids.txt',
'a.txt',
);
};
Above is my code, instead of download the file, the browser directly open the file.
I google a lot recently, it may caused by fetching file from serverurl not localhost.
But i can not find any way to fix this.
Can anyone take a look and help about this issue?
The text was updated successfully, but these errors were encountered: