FR: Obtaining the true filename of an asset that uses the Content-Disposition HTTP header #914
Unanswered
jamesmacwhite
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
I guess this is a wider request because the asset importing functionality seems quite heavily based around images, rather than general files or documents like .doc, .pdf etc, based on the documentation and codebase class/functions.
Some third party feeds may provide URLs to files like this one below:
https://domain.com/asset/download?id=135356
The issue with these types of the URLs is that additional hoops have to be jumped through to get the asset file properties. One of the main issues is these URLs are aliases to the "real" file and usually use the Content-Disposition header which holds the proper filename like:
It would be nice if Feed Me could take the Content-Disposition header into account when the filename cannot be determined by the existing tests. I believe the fallback is to use the MD5 of the file. However, if you plan to use the assets on a front end, both the filename and title used will be the md5 string like
gf873jg843nkj484k498n4584.doc
which isn't very nice and not friendly.Beta Was this translation helpful? Give feedback.
All reactions