cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Load a zip file from a download url link

nisars
New Contributor III

Hello,

Is it possible to extract data from the download link - NaPTAN and NPTG - NaPTAN - DfT

A file reader snap or a zip file reader only recognises this as a file as an asp.net file - Naptan.ashx, however clicking on the link downloads a zipped file containing 16 csv files.

Thank you for your help

1 ACCEPTED SOLUTION

Take a look at this pipeline, which I created to enable you to download the file, extract the contents from the zip file, and then remove the downloaded Zipfile.
ZipFile_2018_08_08.slp (13.2 KB)

View solution in original post

6 REPLIES 6

nisars
New Contributor III

Thank you all @tlui, @dmiller and @cstewart.

The pipeline is great. Much appreciated. Have been able to get all my data through without issues now.

bgiles
Former Employee

Note for readers from the future: the snap peeks at the first few bytes of the file to determine if itโ€™s a .zip or .7z file. It doesnโ€™t look at the file extension. Those are standard values and itโ€™s not an exaggeration to say that if those bytes arenโ€™t set then itโ€™s not a .zip or .7z file. Since some applications that support additional formats will quietly use the correct decoder itโ€™s possible that you think you have a .zip file but itโ€™s actually something else.

When in doubt itโ€™s best to create an empty archive, or one with just a single entry, and attach it your question. That allows us to verify how the third party library we use is identifying the file. There are some proprietary extensions the zip format, e.g., to support strong encryption, and itโ€™s possible that the library is returning an unrecognized MIME type. We wonโ€™t be able to read the encrypted entries but we could provide a more meaningful error message in this case.