Aidan
(Aidan)
March 9, 2022, 10:58pm
1
Hi, I know this topic has been raised before in regards to image file names.
Does the same apply for documents? E.g. we have a PDF hosted in the media library: "About_the_Clinic.pdf"
When it downloads to a patient's computer it has the hash prefixed:
5e23fccd-0d04-4a5d-98d1-f0ab656756a1_About_the_Clinic.pdf
This can be very confusing for our patients.
I understand the need for filenames to be unique, but surely the name-spacing of the domain is sufficient? Is there a solution for this?
Thanks
Priyanka
(Priyanka Maheshwari)
March 10, 2022, 10:47am
3
Hello @Aidan
It's the same case for the Image file name. We have discussed it before:
Hello @grafik
Currently, the only solution to change the filename is to write your custom code for decoding on the front-end itself. It will give the required filename in your application.
Thanks,
Priyanka
Thanks,
Priyanka
Aidan
(Aidan)
March 14, 2022, 1:18am
4
Hi Priyanka,
Thanks for getting back to me. That link describes custom file name characters.
My issue is the '5e23fccd-0d04-4a5d-98d1-f0ab656756a1' code that Prismic is pre-pending to our uploaded documents. We're not adding any of these characters.
Please advise.
Priyanka
(Priyanka Maheshwari)
March 14, 2022, 1:52pm
5
Hello @Aidan
5e23fccd-0d04-4a5d-98d1-f0ab656756a1
is an asset ID that is necessary to add by Prismic so that anyone can upload the same asset name file.
I can't reproduce your issue; It downloads a pdf in my local with the same name without the asset ID.
Can you please share a recording with me?
Thanks,
Priyanka
Aidan
(Aidan)
March 14, 2022, 10:49pm
6
Hi Priyanka,
You can see the links here: MindSpot website site map
The PDF documents were uploaded to Prismic media library and then linked via the editor's "Link to a media item" option.
Thanks again.
Priyanka
(Priyanka Maheshwari)
March 16, 2022, 1:05pm
7
Hello @Aidan
This is the expected behavior and response from the API when you query. When you download a pdf in your local, it will stripe the asset Id and download it as an original name. You can try to remove hash from the URL on the frontend. I haven't tried it, but you need a developer to achieve it.
Let me know if you have any further questions.
Thanks,
Priyanka
Aidan
(Aidan)
March 17, 2022, 5:16am
8
Use case:
Our therapists will often send a PDF link directly to a patient via chat or email.
Currently those links appear to the patient as:
"https://mindspot-marketing-v2.cdn.prismic.io/mindspot-marketing-v2/5e23fccd-0d04-4a5d-98d1-f0ab656756a1_About_the_MindSpot_Clinic.pdf "
Which clearly looks terrible and would have some patients questioning the validity of the link.
You can try to remove hash from the URL on the frontend.
This isn't an option in the use case above.
I understand this is just "how it works" currently but I feel this should be addressed.
Thanks.
Priyanka
(Priyanka Maheshwari)
March 17, 2022, 1:42pm
9
Hello @Aidan
I understand your use case. I will indeed discuss this with the team.
Let us know if you have any further questions.
Thanks,
Priyanka