jeudi 6 août 2015

Attachment not downloading, though the response contains the data with right response header

Here is the request and response headers:

Request URL:https://localhost/createPPT/:
Request Method:POST
Status Code:200 OK

Response Headers
view source
Accept-Ranges:bytes
Cache-Control:no-cache, private, must-revalidate, max-stale=0, post-check=0, pre-check=0
Connection:keep-alive
Content-Disposition:attachment; filename="ExportedProjects.zip"
Content-Length:155646
Content-Type:application/zip
Date:Thu, 06 Aug 2015 12:50:11 GMT
ETag:W/"25ffe-471499980"
Last-Modified:Thu, 06 Aug 2015 12:50:11 GMT
Vary:X-HTTP-Method-Override
X-Content-Type-Options:nosniff
X-Download-Options:noopen
X-Frame-Options:SAMEORIGIN
X-XSS-Protection:1; mode=block

Request Headers
view source
Accept:application/json, text/plain, */*
Accept-Encoding:gzip, deflate
Accept-Language:en-US,en;q=0.8
Connection:keep-alive
Content-Length:28
Content-Type:application/json;charset=UTF-8
Cookie:connect.sid=s%3AK5ypKXysxzu1zSHsAmg1sLpsuTZ7aUjY.8z%2FnR1cfCzo9FgnCh8tUIOCijtrUwigT%2BwyYSSaVieU; loggedin_User=%22admin%22; garlid=%22556e8ebb658149350bcd96b1%22; max_priority=1
Host:localhost
Origin:https://localhost
Referer:https://localhost/
User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.125 Safari/537.36

Request Payload
view source
["55af65cab610b5e8267d47d3"]

I am using MEAN stack and using response.download() function for downloading the attachment. The request is getting fulfilled, that is I am able to get the response and the response contains the data too but it is not downloading. It would be appreciable, if anyone can help me with this problem.




Aucun commentaire:

Enregistrer un commentaire