[wp-trac] [WordPress Trac] #38231: Allow download_url to respect content-disposition header

WordPress Trac noreply at wordpress.org
Tue Oct 4 21:39:24 UTC 2016


#38231: Allow download_url to respect content-disposition header
----------------------------+-----------------------------
 Reporter:  cklosows        |      Owner:
     Type:  enhancement     |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Filesystem API  |    Version:  trunk
 Severity:  normal          |   Keywords:
  Focuses:                  |
----------------------------+-----------------------------
 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.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/38231>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list