Downloaded rar file has very small size
aviralgoyal opened this issue · 4 comments
When downloading a file using file-saver package the file is getting downloaded correctly with size 600kb
with this code :
saveAs(fileUrl, fileName);
But when I'm using ngx-filesaver the file dowloaded is 65kb and the unrar process is giving an errror
this._FileSaverService.save(fileUrl, fileName);
Any idea what I might be doing wrong? or is it some bug?
The file I'm using is a rar file which is being served by a nginx server upon calling the fileUrl.
Can you provide the download address of rar?
rartest.aurigasoftware.in/1/sampling/sam-1596067683714.zip
It seems the issue as you pointed out might be CORS related as I'm directly serving the file from nginx which has a default policy of lax. I'm going to create a backend server for handling such requests and send the data as BLOB to eliminate this problem completely.
Thanks a lot for your prompt replies, much appreciated.
Stay Safe!