Downloading tgz bundles in firefox is gzipped twice - spring

I have written an api to download tgz file. With #produces as application/zip
But, this api works fine in chrome, but hitting the request through firefox , downloaded file needs to be zipped twice.
Md5sum of the file downloaded through chrome is different with firefox.
Do we have any workarounf for this with server side code(API). I have written the api in java spring mvc

Related

download zip file using Rest API responding null file immediately

I have spring boot API for downloading zip file, when i hit rest API in IE or chrome, API responding with file name as null, with no content, if try to hit the same api again after few seconds, the file getting downloaded.
how to fix this issue.
Please help.
Thanks
Daya
this is due to the filename was set after the content(stream) was written to response, once content was written the control return back to client - before filename was set to the header.

Download blob url

I am working on some chrome extension that detects when a user downloads a file, the extension block the download, sends the download URL to my server, the server downloads the file, scanning the file for virus and if it's ok sends it back to the browser.
all is good except in some cases. when the user downloads a file from his WhatsApp web chat I'm catching the download URL as:
blob:https://web.whatsapp.com/6addcff5-671a-4369-8ead-232099b748c3
but how do I download this blob? I tried to download like a regular link but it gives an error:
using (var client = new WebClient())
client.DownloadFile(theBlobUrl, filePath);
My server is written with C# so prefer a C# answer, but other languages would also be helpful too.

Google Drive Rest API V3 Downloading large files with alt=media option (>25MB)

I am trying to figure out how I can download a large file directly in the browser via the Google Drive API V3.
I'm using option 1 which is : Download a file — files.get with alt=media file resource
When I send my request ( https://www.googleapis.com/drive/v3/files/[fileId]?alt=media), I got the content of the file as a response of it.
Currently I'm creating a blob file with the response of my query, then reading the blob file to start the download on the browser.
The problem with that is, reading the blob file consumes a lot of memory and if the file's size is more than 10MB, then browser crashes.
So my question is : how can I start the download on browsers via the Google APIs like mention on the screenshot bellow? See expected result
Try downloading the file in chunks using the range http header. See https://developers.google.com/drive/v3/web/manage-downloads "Partial download"

unable do download file from ie11

unable do download file from ie11, when click on download button post request send to the server. I checked in network section the response will come with content of file but in internet explorer 11 download prompt will not appear instead of that if display error page can not display and url will not correct . This program working fine with Mozilla Firefox.
I created a demo program which runs on my local host with same configuration ie11 works fine. but same program I tried to run on my production server tomcat getting same error.
I had this same problem,but incase of PDF's my pdf file was not downloading from IE, in my case also the file was getting downloaded from the Firefox, I just checked the url, there is no such limit to the length of the url but in this I just reduced the length of the url and it worked, but I didn't get what IE does different in this maybe its the server which is handling the request from IE differently or while sending IE is doing something different, just check if this works, reduce the length of the url and try again.

.NET:ERR_INSECURE_RESPONSE in Hangout Integration

I am using Google Api for Hangout Button-
https://apis.google.com/js/platform.js
Instead of linking the file using https link i can download the file and link it locally. By doing this, will it cause any issues??
Reason for me doing this - Because Sometimes the chrome throws error - .NET:ERR_INSECURE_RESPONSE in loading the file. Linking this file locally would solve this.

Resources