Questions tagged [content-disposition]

The Content-Disposition response header field is used in HTTP web responses to convey additional information about how to process a response payload. It can also be used to attach additional metadata such as a filename to the response.

The Content-Disposition response header field is used in HTTP web responses to convey additional information about how to process a response payload. It can also be used to attach additional metadata such as a filename to the response. The full definition of the content-disposition header is outlined in RFC 6266.

The content-disposition header is added to a HTTP response when further descriptive information is desired to aid the receiver in interpreting the payload. Usage follows the following grammar:

content-disposition = "Content-Disposition" ":" disposition-type *( ";" disposition-parm )

disposition-type = "inline" | "attachment" | disp-ext-type ; case-insensitive disp-ext-type = token

disposition-parm = filename-parm | disp-ext-parm

filename-parm = "filename" "=" value | "filename*" "=" ext-value

disp-ext-parm = token "=" value | ext-token "=" ext-value ext-token =

Questions related to this tag should be concerned with describing the payload of a HTTP Response. An example question may be - "Save a PDF that's been streamed to the browser"

448 questions
0
votes
2 answers

IE closes windows immediately when download starts

I have a PHP script which downloads files to the client, in a new window. It works great in firefox, but in IE8 the window opens and then closes immediately. Note this ONLY happens for some files (like text/plain type), but for others (eg:…
-1
votes
0 answers

Unable to get Content-Disposition header in Axios response headers list

If anyone using Axios ( i faced it in Nuxtjs ) are not able to get any response headers except the content-type then the reason behind it is that by default CORS ( server ) doesnt allow the exposure of headers except the content-type due to security…
-1
votes
1 answer

Positioning a div element near another one with javascript (I do not have much experience with javascript)

I tried to position a div element at the right of the other div when the mouse is hovering it. I have to do this operation with more than one couple of div. I solved the hovering problem, the only issue is that the position of the appearing div is…
-1
votes
1 answer

Force download of large files on a shared server

I am trying to add a download link to a large video file (approx 300MB) on someone's site but unfortunately they're on shared hosting (i've told them they will have to upgrade if they get many people downloading it). I don't want people to have to…
deshg
  • 1,233
  • 4
  • 27
  • 45
-1
votes
1 answer

Using NFTStorage WebApi (upload) with some problem and get an error "Response status code does not indicate success: 500 (Internal Server Error)."

And i use Postman to test is Body using "form-data" and "key" is file "value" is upload ur file, Headers u should set "Key" is Authorization "value" is Bearer yourapikey from NFT storage account. And this can work! and here is mycode it will got an…
-1
votes
2 answers

How to get filename from url considering all cases?

I want to get the filename from a url working without any exception but I don't know all possible cases. I have the method below but it doesn't work for all cases. If anyone did this before please help public static string…
Ali Tor
  • 2,772
  • 2
  • 27
  • 58
-1
votes
1 answer

Suppress messages with Content-Disposition header to file output

When someone calls a URL, I want to post him/her a .csv file. This works with Content-Disposition headers. However, I would like to tell php in my program when it should start with the output and when it should ignore messages being otherwise…
-1
votes
1 answer

How to deal with filename with space in the url (Firefox)

I have a link (url) to cloud front http://example.com/11111111-bbbb-8888-aaaa-12345678900aa?response-content-disposition=attachment;filename*=UTF-8%27%27tsv%20test.txt&Expires=1513693756 when I use this link not in the firefox everything works fine…
b3lowster
  • 415
  • 1
  • 6
  • 18
-1
votes
1 answer

Content-disposition filename "suggestion" is always ignored. Why?

This is a portion of a CGI program written in C. When the client clicks the link, I want the file to begin downloading, with the suggested default filename. I know the spec clearly states that the filename specified in the Content-disposition header…
pgg
  • 49
  • 2
-1
votes
1 answer

XML nodes rewritten to lowercase when using Content-Disposition:attachment

I have two web applications that perform the same task: generating an XML file. The XML nodes are mixed case and case sensitive. The apps run in different environments and can't be moved. I'm using Content-Disposition to send the XML string as a…
Trint
  • 19
  • 3
-1
votes
1 answer

php : abount Content-Disposition header

A file named 'hashed.png' in server. and I can request like "http://server_name/hashed.png" but It's original name is 'hello.png' when I upload to server (It's relation is in db) and when I request that url and when download it, it named…
-1
votes
1 answer

Java encoding filename Content-Disposition

I have GWT app from where I can download some files. And I've got a problem with encoding. Here is some code: String n = "Żółw testuje ąśżźć !#$%~ du"; String tmp = new String(); for(int i = 0; i < n.length(); i++) { String t =…
-3
votes
1 answer

Possible vulnerability by content disposition header

Consider a response with Content-Type: application/json;charset=UTF-8 header and Content-Disposition: attachment;filename=text.txt header, with content-disp header appearing first , i am able to use the content-disp in my favor as a CSRF attack…
1 2 3
29
30