Original file name for attachments are different on dev and stage

Vladimir Udalov asked on August 9, 2018 11:43

Hi guys,

I got a strange case with attachment file name resolving on dev and stage servers. We use staging on our site. All media stored to Azure storage.

On dev site file link has format : < dev site >/getattachment/< file guid >/< file name >, its PDF. When open file url stay the same and customer can download file with original name.

On live\stage site file has format: < stage site >/getattachment/< file guid >/< file name > . When open - url resolves into azure storage path https://< my storage >.blob.core.windows.net/< container name >/< site name >/files/XX/< guid >.pdf - direct link to file storage. In this case file name is lost. Customer could upload file with guid name.

Any ideas how can stay original file name?

Recent Answers


Zach Perry answered on August 9, 2018 18:47

Are your settings between the two the same? Sounds like DEV might be storing the files in the database maybe?

If i recall correctly whatever name is supplied in the getattachment path is the name the file will download as, so that doesn't have to reflect the actual file name.

0 votesVote for this answer Mark as a Correct answer

Vladimir Udalov answered on August 10, 2018 15:02

Thanks Zach, actually both use file system for storing.

On dev is ok, but on live on download file link redirects to real Azure blob storage path which ended with guid.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.