Opened 4 years ago
Last modified 22 months ago
#38231 new enhancement
Allow download_url to respect content-disposition header
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 4.7 |
Component: | HTTP API | Keywords: | has-patch |
Focuses: | Cc: |
Description
In #34938 it was proposed to use a filter in the wp_tempnam
function which was rejected in favor of ignore the query string when downloading a file. This, however can still propose a problem when someone is the function to download a tokenized file where the path can be long.
In the case where the headers of the response provide a content-disposition
header including a file name, it would be ideal to have the download_url
function respect this file name and move the file name (which by default is the token in the path) to the file name requested.
Attachments (1)
Change History (3)
Note: See
TracTickets for help on using
tickets.