Skip to main content
Question

Download Shape-file with authentication

  • October 30, 2014
  • 4 replies
  • 10 views

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

david_r
Celebrity
  • October 30, 2014
Hi,

 

 

try inserting the username and password in the request URL:

 

 

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

 

 

David

fmelizard
Contributor
Forum|alt.badge.img+17
  • Contributor
  • October 30, 2014
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

Forum|alt.badge.img
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!!!

Forum|alt.badge.img
That should have said GOOD LUCK not GODD LUCK ... :-)

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings