Question

Download Shape-file with authentication

  • 30 October 2014
  • 4 replies
  • 1 view

Hi,

 

I need to automate the download of a Shapefile (as a ZIP) from a site which requires authentication. The Shape-reader will read a ZIP directly from a URL, but does not allow for authentication params. I have looked at HTTPFetcher but unsure how I can get this to download the file for me. Anyone?

4 replies

Userlevel 4
Hi,

 

 

try inserting the username and password in the request URL:

 

 

http://username:password@www.server.com/path/path/file.zip

 

 

David
Userlevel 4
Badge +13
Hi,

 

If you are going to use the HTTPFetcher, then have a look at the save file and output filename parameters, when set to yes, you can specify a location to save the shapefile.

 

Itay
Badge
David is correct. I use this all the time and if your parameters were something like this:

 

 

ftp site: ftp.cocacola.com

 

username: breX_login

 

password: 12345678

 

path of where your shapefile is on the site: datafolder/all/shapefile.zip

 

 

You would put this full path into a reader. That reader can simply be an Esri Shape reader. Then type the following (based on my example above) into the Dataset field:

 

 

ftp://breX_login:12345678@ftp.cocacola.com/datafolder/all/shapefile.zip

 

 

Then click OK. It's as simple as that.

 

 

FYI: Be patient because typically it takes a few moments for the Reader to appear in your FME Workbench job. It's having to make the connection and find the folder and the shapefile.

 

 

GODD LUCK!!!
Badge
That should have said GOOD LUCK not GODD LUCK ... :-)

Reply