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

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
SOLVED

URL download question

Highlighted
Alteryx Partner

Hi,

I'm having trouble passing a URL through the download tool.  Its an https link which, when i paste directly into a browser initiates a download.  However, when I pass it through a text input to the download tool, I get a parse error on one of the attributes in the query string.

 

I'm sure I'm missing something really simple here!

 

Here's an example URL (they expire after an hour so I'm sure it won't work - you will get an expired request response):

https://axle-deliveries.s3.amazonaws.com/deliveries/a7139011213aebc9/output/US_Business-00000_place....

 

Here's an example of the error response I receive in the download tool:

<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>AuthorizationQueryParametersError</Code><Message>Error parsing the X-Amz-Credential parameter; the Credential is mal-formed; expecting "&lt;YOUR-AKID&gt;/YYYYMMDD/REGION/SERVICE/aws4_request".</Message><RequestId>6E07F5E38B17DF48</RequestId><HostId>KvG6deDYqd+Tri7uVJDqXakzPlFJmtvCzcWIjhhAIUrVljqQmK6fUiSaErhqAwgYb199VZx8T/s=</HostId></Error>

 

I'm using the following settings in the download tool:

 

Basic:

  • field = URL (which is the name from text input tool)
  • encode URL text (checked)
  • output:  to a field / string

 

Payload:

  • GET
  • nothing else selected or entered

 

NOTE: if the hour passes, i get a "request expired" response instead as expected.

NOTE: the end process I'm going for is 

a) request using the download tool a JSON response with the "subscription" details for the files available to me

b) parse the URLs out of that response

c) submit those URLs to the download tool to pull the files

 

parts a + b are working.

part c I tried but get the same error for each file that I pasted above for the single text input URL.  

 

 

 

Alteryx Partner

Hi Peter,

 

It looks like there are special characters in your AMZ Credentials that are encoded by the Download Tool which results in AWS not recognizing your request.

 

&X-Amz-Credential=AKIAI42R5GCTOOUYM44Q%2F20170412%2Fus-east-1%2Fs3%2Faws4_request

 

You could try a number of things which should make it work:

  • Turn off the Encode Tickbox and encode what is needed yourself before feeding the URL into the download tool
  • Append the parameters separately in the payload so that they aren't encoded.

 

Hope this helps.

 

Cheers,

Wesley

Alteryx Partner

Thank you Wesley!

That was exactly it.  %2F = /

 

 

i also facing this problem I tried in many ways but it wont works.
Can you tell how did you solve this. this is my code

 const  imageLocation = encodeURI(url);
fileTransfer.download(imageLocation, this.storageDirectory ,true).then((entry)=>{

}

i get error code 3

 

Thanks

Labels