Custom form file upload - download link keyword?


(Oliver Kass) #1

Hi folks,

 

Anyone got any ideas on a keyword that can pull through a download link in recipient email formats to assets uploaded via custom forms? Basically we are having problems with attachments over a certain size being blocked by our email servers so I was thinking a download link might be a solution.

 

I thought the answer might be to modify this keyword somehow but so far I'm drawing a blank:

 

%response_sectionx_qx_file_content%

 

Thanks

 

Oli


(Oliver Kass) #2

Ah I see there is another post in the forum relating to this. It looks like this keyword will work for Matrix 5.2:

 

%response_<parent_id>_<question_id>_file_id^as_asset:asset_url%

 

Unfortunately we're still running 5...


(Bart Banda) #3

If you want to send the link in the thank you email, can't you use %response_<parent_id>_<question_id>^as_asset:asset_url% ?


(Oliver Kass) #4

That doesn't seem to work Bart unless I'm missing something. Tried:

 

%response_37557_q1^as_asset:asset_url%

 

And it just comes through as blank in the email...


(Peter McLeod) #5

Hi
 

If your version was >= 5.2 then you could use:


%response_37557_q1_file_id^as_asset:asset_url%

Otherwise you could do some keyword modifications on %response_37557_q1% which would be a string something like ‘test.txt, type text/plain, 4 Bytes’, and hardcode in the path to the asset where the files are being saved:

 

Eg: 

http://www.yourdomain.com/asset/%response_37557_q1^maxwords:1^replace:,:%

Thanks

Peter

(Bart Banda) #6

Ah that's right, %response_37557_q1% only gives you the file name of the file, not the ID, sorry.

 

You could do something like Peter is suggesting, but only if the file is not placed in the __data directory as it gets a different web path then. 


(Oliver Kass) #7

That's ideal Peter, Thanks for that. We're due an upgrade in a few months but this is working in the short term.

 

Always more to learn with keywords...

 

Oli