Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Look at response headers to determine file name on "Send and Download" #2082

Closed
adegroff opened this issue May 25, 2016 · 58 comments
Closed
Assignees
Labels
Milestone

Comments

@adegroff
Copy link

  1. Postman Version 4.2.1:
  2. Chrome app
  3. win / x86-32
  4. Interceptor on and enabled
  5. Feature enhancement
  6. Expected behaviour:

I have an endpoint that returns a file with the headers:

Content-Disposition →attachment; filename="filename.pdf"
Content-Type →application/pdf

Postman opens up a save dialog to save the response as "response.pdf"
It would be nice if Postman would default to save the file under the filename provided in the header (eg. "filename.pdf")

@a85
Copy link
Contributor

a85 commented Jun 16, 2016

This is fixed as part of the new Postman Runtime project. Details on our blog: http://blog.getpostman.com/2016/06/14/introducing-postman-runtime-more-power-better-control/

@anavioc
Copy link

anavioc commented Jun 30, 2016

I think doesn't work.
I had downloaded Postman Canary and name proposed for save file is "response.pdf"

Http Headers include:
Content-Disposition →attachment; filename="xxx"

@kmix
Copy link

kmix commented Nov 1, 2016

I'm seeing the same thing in the Windows app. Current version is 4.8.1.

@sdnts
Copy link

sdnts commented Nov 2, 2016

@anavioc @kmix We're working on this, will let you know here when a fix is out :)

@anavioc
Copy link

anavioc commented Nov 2, 2016

@madebysid 👍 thanks!

@aku246
Copy link

aku246 commented Nov 30, 2016

Jaldi karo be... Yahan client se halat kharab h. Alok b gussa re h.

@koos42
Copy link

koos42 commented Dec 9, 2016

Just discovered this, it would be nice if Postman respected filename content-disposition header. I'm glad you all are working on this and look forward to the fruits of your labor. Thanks!

@sdnts sdnts added the feature label Dec 9, 2016
@sergiorykov
Copy link

It's still actual for v4.9.2 :(

@albertomr86
Copy link

Same problem here!. Version 4.9.2.

@prem911
Copy link

prem911 commented Feb 24, 2017

I m on 4.10.2 and still get the same result response.pdf.pdf

@aku246
Copy link

aku246 commented Feb 24, 2017

try send and download.

@adegroff
Copy link
Author

adegroff commented Feb 24, 2017

Update on issue:

running Postman for Chrome
Version 4.10.2
win / x86-32
Chrome 56.0.2924.87

performing a 'Send and Download'
Cache-Control →no-cache Content-Disposition →attachment; filename="another file name.pdf" Content-Length →1391192 Content-Type →application/pdf

Result is still saving the file as "response.pdf" and not "another file name.pdf"

@05F3759DF
Copy link

Postman for Chrome
Version 5.0.0
OS X / x86-64
Chrome 58.0.3029.110

Same problem still exists!

@ericis
Copy link

ericis commented Jul 6, 2017

bump just ran into this myself :)

@hvernanda
Copy link

Just want to "up" this issue

Access-Control-Allow-Headers →Origin, X-Requested-With, Content-Type, Accept
Access-Control-Allow-Origin →*
Connection →keep-alive
Content-Disposition →attachment;filename=yearly_data_user.csv
Content-Length →331
Content-Type →text/csv; charset=utf-8
Date →Thu, 20 Jul 2017 04:41:20 GMT
ETag →W/"14b-JN9w/1EOr+hx9LxGE1c2zaIwhuE"
X-Powered-By →Express

Result is still saving the file as "response.pdf" and not "another file yearly_data_user.csv"

@ArunKSY
Copy link

ArunKSY commented Aug 17, 2017

Request Headers:
cache-control:"no-cache"
Postman-Token:"9ae5d8d4-cd9a-49fe-9540-ba81d5da60c4"
Content-Type:"application/x-www-form-urlencoded"
User-Agent:"PostmanRuntime/6.2.5"
Accept:"/"
Host:"192.168.0.73:8093"
cookie:"JSESSIONID=131D2DE67E67791ADB2B42F285CA0CE7"
accept-encoding:"gzip, deflate"
content-length:60
Request Body:
Response Headers:
server:"Apache-Coyote/1.1"
content-disposition:"attachment; filename="120451295.png""
access-control-allow-origin:""
access-control-allow-credentials:"true"
access-control-allow-methods:"GET, POST, DELETE, PUT, OPTIONS, HEAD"
access-control-allow-headers:"Content-Type, Accept, X-Requested-With"
content-type:"image/
"
content-length:"2439"
date:"Thu, 17 Aug 2017 09:52:20 GMT"
Response Body:
�PNG

IHDR�.��T"�Z pHYs�����g��R�tEXtSoftwareBarcode4J��v. �IDATx���W��K������s�9��� 3fE|SQ�I�,("f�9��s�(
⋊����*j{{vW��r�=UPP���=�]������*srr�ǩʇ��Ɂ����rrr�E�����ׯ_1�{�.�x�b�߾}[ �t)�o޼)�����ɶfϞ����6L��Çg�f�R9u�˗/�/7r�H���������*߸q���gϞe7o�L�1u��d��o��:S�L)�>n�8����#-�?��?|�P˫�������Z>a���hҤI�!ڕ��/&�W�����?V�ɓ'A�u���g 옌�=:�O�6��|ԨQ%�sƌ���G����gΜY 3�B�^���+W�����U���,��%�����.d�߿�����������f���^�zYUUUŌ2�:t(�O�>U��9|��ʖ��9�l�o߾�zÆ
�>}��ɍ�5J�w�����6i�D�ܽ{7;u��ʧO�.j��:s�L���]�&�8w����ܹs��֭[�u�-ԦM�-�z����m�V˭��k�.p)�СC�_�ڵk������+�Q���dމ�Fd!���I���Cy�n�
ʛ5kV�9{��YP�y�z���5n�Xe�[�E&��cǎ���"Q������Ȗ�o���<��d������0��r9��X�,���ˁ��r9��X����Xx�d�+��/^d'N��2��<yRe�����$�1�����^�X޹sg�p��Pwٲeٚ5k����-9�cƌѶ�\M�<Y�իW�{��������ׯ�Ǐ����u��e��,��e˖������ u6oެ޼A���6V�\��{����_�|�>|������-4q��pMaÆP���:x������ŋ�={���������K��:�ǝ;w����g��>}�����8����������DZcdž�m۶�q�i��������ܯ
?��o�ڵA�#�P��o���/��A���(��0:��"�˖hW�E>��^�3gN����bA��u�+:��Ŋ�{������ȖX�Y��Ξ=��v��%i�,���Rt�ԩ�z��;v�vؚ�ۈ-V޻���bI�nc�X��ْX)k���-[��[Ʀ��b\�6mZ�b��E�+Ŝ���b�!����Q�+��r9��X�,���ˁ��r9��Xu�X(7�)����cY<��)����䠨L����-�����X(0�����o߮e��JN��!C
�����M��ħI[��� (��cb�^�w�7��Q����k_�K;đ��l޼y�
������ݻwk���i�&�J .O��Gځ���
���7n �@�Ӷ�������ϟ�{�֭��x����C�㱁��c��������œ9t�Тy��q�٘��̳�[I{�9󍌧�Ŷ���U�{�+�at���9�
R���l��� �*�%�ՠA��łx�R�P�>�ܣG�P��Y��׮�XB-Z�HZ,V{V�T;b�,�},�Ō��@�[,@�}�T���a���R����y��w-�������b�d���v�+o� F?�Q��+��r9��X�,���ˁ��r9��X�,���ˁUk��˳���kU��S�X13)���-U�ݞ����A��Xy�2Kt;{J��1Y�},��n)�Dz���,��9޻��SjO���XX�,�dO�0U�ݞ��<=�Hwt!�����ˁ��r9��X�,���ˁ��r9��X�,��������bFAD��5����t*���©�\�K��T�.�۠͹s��68�o�H -��w��U��I &
L��Em����qx!�_鋀M��"��+Dp.i (��㇖󮌉�ᦂvm�.��v���x�@�� Y���8����J������}��%۔�[��"Ʊ��{�޽� \����=�ǻ�l�>+
,�ٱc����2&6�����Vrl��!���G��6��Vzl$u=/� y$R�+�؈%��أ"B�]�>Vl��>��R'>6b��=6R�[�jU�bA�3e���9f�X��c��b�wl$/�L�b x��i�y,���ˁ��r9��X�,���ˁ������6&��u8�-I:I��׌�"�#2�/�l�ΘI2 �Y��<%�$���-����r�XJ�N�_��vr<^�\r�]�t�x� �n�Z�J�wZ���޽{�%K�h�����ϟ?g555����K��R�b� M̙J� KRO�#�&c#��,�Y�d�ֵ�'�d�臹�O��m��<�C��&�\�|�����z�=a��X,a�L�U��>V�Ų{Z�]� ��b:�b�K1�s*����ʳX��ڣ !ږ��R�J&cSL�l���lb��X|�Y,˩���KIՍ������ˁ��r9��X�,���ˁ��r���Ə{���7qm�E�d?��3�)�\�qo!�Sy����L��Ɵ|�;f�ZBl��>�-�@�qo�R�٭��N}�;��.�q����Ƅ�O�y1���g�
���;�C��qo�ũ�l9�
�Z�[�\��������'�������Ɂ��Tg�7�1��xGC.IEND�B`�
200

@nlaslett
Copy link

nlaslett commented Sep 8, 2017

Bump. I'm seeing this in Postman for Windows 5.2. The filename is there in the Content-Disposition but Postman always wants to save the file as "download.pdf".

That's when I use the API that returns a download link. When I use the API the returns the in-line content stream it wants to use "response.pdf", but that API call isn't returning Content-Disposition filename, so I can't blame Postman there.

(FYI, I'm using the Alfresco Document Management REST API to return files.)

@bensullivan
Copy link

Bump.

Content-Disposition →attachment; filename="advice-0542961c-c82d-408a-9934-1a020c098dc5.sheba"
Content-Type →application/xml
Date →Tue, 17 Oct 2017 06:35:31 GMT
Server →Jetty(9.4.4.v20170414)
Transfer-Encoding →chunked

Result is still saving the file as "response.xml" and not "advice-0542961c-c82d-408a-9934-1a020c098dc5.sheba"

I'm running version 5.3.0 on OSX 10.11.6

Any update on when this might be addressed?

Thanks

@sergioatzori
Copy link

Same here: Postman stand alone, 5.3.0.

Cache-Control →no-cache, private
Connection →Keep-Alive
Content-Disposition →attachment; filename="sistema-latruccheria.pdf"
Content-Encoding →gzip
Content-Type →application/octet-stream
Date →Tue, 31 Oct 2017 15:50:31 GMT
Keep-Alive →timeout=5, max=100
Server →Apache/2.4.10 (Debian)
Transfer-Encoding →chunked
Vary →Authorization,Accept-Encoding

When I "save & download", Postman saves response.bin

@emazv72
Copy link

emazv72 commented Nov 2, 2017

Would be nice to have for my use case, like testing a REST download API.

Postman stand alone 5.3.2

Method: POST

Response headers:

Content-Disposition →attachment; filename="test-pubblica-2.pdf"
Content-Type →application/pdf
Date →Thu, 02 Nov 2017 17:22:31 GMT
Server →Apache-Coyote/1.1
Transfer-Encoding →chunked

Postman saves a generic "response.pdf"

@MattGurney
Copy link

I would also like this feature. It appears that Postman heeds the content-type header to determine the file name extension ("content-type:application/zip" produces response.zip) but ignores the content-disposition header filename property and makes the start of the file name always "response".

@m3talstorm
Copy link

Just hit this myself, would be great to see this added.

@gustavoponce7
Copy link

Any update on this implementation?

Currently using the latest version (5.5.0) and postman doesn't respect the filename defined in the header.

@esodot
Copy link

esodot commented Jan 2, 2018

Postman v5.5.0 is still NOT extracting the correct filename from Header with name "Content-Disposition". Hey guys, imho it's easy to fix this issue. Please give it a greater priority. Thank you. Kind regards esodot

@esodot
Copy link

esodot commented Jan 2, 2018

please also for response of type "application/octet-stream", where current response is being saved to "response.bin" file. Thank you

@hoomb
Copy link

hoomb commented Jan 24, 2018

Still waiting for this feature. even after 1,5 Years

@kyleobrien91
Copy link

Any update on this? It's a disconcerting issue to have after 1.5 years. If you don't have the time, any pointers on where to start looking to perhaps submit a PR?

@grantyb
Copy link

grantyb commented Feb 27, 2018

I'd like to make the same offer as @kyleobrien91 . I'd love to see this fixed, and would be proud to contribute a fix if you could provide the starting guidance?

@makdeniss
Copy link

same here: response.bin instead of xlsx.

@ramya-nadupalli
Copy link

ramya-nadupalli commented Jun 28, 2018

6.1.4 I still see the issue, not saving the file in the exact output format, eg My response is abc.lfg but saves as response.zip

@a85 a85 self-assigned this Jun 29, 2018
@a85 a85 added this to the Short term roadmap milestone Jun 30, 2018
@dyre
Copy link

dyre commented Jul 30, 2018

still an issue. glad to see it has been added to the roadmap... only 2 years after the first report

@johno1985
Copy link

johno1985 commented Aug 6, 2018

Still an issue on version 6.2.3, Windows 10

@debodirno
Copy link

Facing the same issue on version 6.2.3, Mac.

@JoshuaVSherman
Copy link

facing same issue on Ubuntu 18.04.1 LTS, amazed that this issue is over two years old

@valentin-mentormate
Copy link

Same here. Postmen v6.2.5 :(

@siiberad
Copy link

siiberad commented Sep 8, 2018

Same here

@Alex99y
Copy link

Alex99y commented Sep 10, 2018

Same!

@Prinsn
Copy link

Prinsn commented Sep 11, 2018

another 2 hours clocked by me.

@vlaslaptev
Copy link

Same

@yanzishang
Copy link

Same!

@sujayvenaik
Copy link
Member

sujayvenaik commented Sep 24, 2018

Hey,
We have addressed this issue and file name is now picked from the Content-Disposition header. These changes are up available on our canary channel (https://www.getpostman.com/canary) today and would soon be available on the stable channel. Do try these out in the canary and let us know.

@sujayvenaik sujayvenaik self-assigned this Sep 24, 2018
@sujayvenaik
Copy link
Member

Hey
This issue has been addressed and is available on the stable channel (v6.4.x).
You can update the app to the latest version. Do try it out and let us know.

Thanks again for writing in and reporting this issue.

@grantyb
Copy link

grantyb commented Oct 9, 2018

This works for me now (v6.4.2) 😃 . Thanks @sujayvenaik!

@riteshsingh2204
Copy link

using v6.7.4 and still getting it as Resopnse.pdf.

@gdrugan
Copy link

gdrugan commented Jan 15, 2021

Using v7.36.1 and I get random name instead of name in content disposition at the first run.
But when I click Save Response to file I get the correct name.

@jayudhandha
Copy link

jayudhandha commented Mar 4, 2021

We are using latest version of postman v8.0.6 and we are getting filename as '0' while saving it.

Thanks!

@tinesoft
Copy link

Hi,

I'm using v10.2.2 , and still the issue is present ( "Send and Download" saves file as "response.xxx", completely ignoring the header "Content-Dispostion" --> "attachment; filename=<filename>") ....

@evilmao
Copy link

evilmao commented Dec 11, 2022

I'm using v10.5.2 is the latest version. , and still the issue is present
image
image

@ankitabylle
Copy link

@sujayvenaik
on attaching the file it changes the filename to "/"test.pdf/""
from test.pdf.
I tried adding content disposition but its not working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Sandbox/Runtime
Suggestions
Development

No branches or pull requests