How to download a file from HTTP when site uses Gzip compression?

Right now I have a step “HTTP Get a file” that downloads an audio file from my website. The input bundle looks correct, showing the download path URL with the file name and correct extension (file.mp4). However, the output of that is a “file.mpga”, a binary Data buffer code, and the header for content-encoding shows gzip.

My guess then is that the output is the gzip compressed file, but I need the actual original file as an output to download in a future step.

So, how would I get a file from an Http when my site uses Gzip compression? Or in this case, how would I extract that file to use in a later step?

I tried adding an Archive Gunzip step after and input the Data layer from the previous step, but it fails stating “Error incorrect header check”.

Anyone know how I can actually use that file in its original format, or unzip the gzip appropriately?

try to upload it somewhere like a cloud to download and make sure that is really gzip and can be extracted using tools on your PC/MAC that should give you more clear picture on what exactly you download

1 Like

Hey Alex, so it turns out the file type that downloaded is a compressed audio version of the m4a or mp3 file that is downloaded from my site. For some reason (either Make’s http get step, or my site’s Gzip) is causing the file to be compressed and change extension types. The origianl input URL (and file) contains the correct file type/extension, but after it’s outputted from the http get step, it changes.

Any idea what could be causing this?

Here is the input file/bundle/link: https://theaudioguestbook.co/wp-content/uploads/product_addons_uploads/a02e6d4176d699c6a1bba35fcd7dca08/123-Melrose-St-5.m4a

And the output data is a binary buffer with following headers:
content-type: audio/mpeg
transfer-encoding: chunked
content-encoding: gzip

Data: (File name): file.mpga

As I told you … just test it.
Step 1

Step 2

It works just fine… you simply need RENAME file in output properly.

The issue is your server that returns MIME type for the m4a as audio/mpeg to file automatically get an extension of mpga. While the correct MIME type for m4a is audio/m4a. Also server doesn’t return file type in the header so system automatically names if as file.mpga according to the audio/mpeg MIME type.

You can check the Mime types for ref

1 Like

Ah ok thanks this makes sense. I’ll check out the Mime types and see if there’s a way I can set server side, but for now, will use the original input URL to parse and set filetype so it matches. I was originally setting the filetype using the same get http output so that would explain it.

Appreciate the help!

1 Like