Forum

Thread tagged as: Problem, Error, Forms

File Name Encode - Broken URL when sending automated email

Hi there,

For some reason, URL to a file gets broken if it's name contains spaces when trying to access it from email that's being send automatically when form is submitted.

It's ok for files such as my-file.pdf. However my file.pdf is rendered as https://webiste.com/my file.pdf so when user clicks a link he's redirected to https://webiste.com/my - 404.

Link at APPS>FORMS works regardless.

What can we do about it?

Thanks, Damian

Damian Drozdowicz

Damian Drozdowicz 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Are you talking about the email generated when a form is submitted?

Damian Drozdowicz

Damian Drozdowicz 0 points
Registered Developer

That's correct.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Are you using a template?

Damian Drozdowicz

Damian Drozdowicz 0 points
Registered Developer

Not until now! Thanks for a reminder Drew.

PS: the uploaded file from the input=file gets attached to the email rather than link being rendered out is that something we can do about?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Do you not want it attached? Most people do if they're using the email option.

Damian Drozdowicz

Damian Drozdowicz 0 points
Registered Developer

I agree, although I though it might be better to create a link to the file rather than sending the whole file. Perhaps there is a way to render and urlify / encode the url path inside the template?

If that's not possible right of the bat that's fine.

Drew McLellan

Drew McLellan 2638 points
Perch Support

It's not possible right now. You can email the file without storing it, so there's that to consider.