#PDF download problem / Content-Disposition header is missing

1 messages · Page 1 of 1 (latest)

errant ridge
#

PDF download problem / Content-Disposition header is missing

bronze temple
#

what did you get from another http client like cURL? use curl -I to see the response headers only

errant ridge
#

i dont know what you mean

#

where should i test it

bronze temple
#

so you don't know curl tool?

#

I want to see if this is an issue with your client (that this.http.get)

errant ridge
#

i do not know it no

random wind
#

have you tried the StreamableFile approach?

#

ive had success using this way

errant ridge
#

can try it give me sec

#

no luck

bronze temple
#

then you could see if those response headers are well defined

errant ridge
#

i have authenticator so it get unauthorized

bronze temple
#

then you could remove the auth logic
or do you need that to perform your logic?

#

the goal here is to see the response headers and if the file is being properly sent

errant ridge
#

I could try, but its hard, cant i just log in on postman or something

bronze temple
#

yeah

errant ridge
#

I mean like login and receive a token

bronze temple
#

ok so somehow you got a application/json instead of application/pdf

#

are you sure that that downloadPDF is being invoked? I mean, is there a chance of another route overwriting that one

errant ridge
#

I think so ye let me put a git with these file so u can see

errant ridge
#

Did u see something wrong ? should i maybe make a new controller and service for file upload, file download ?

errant ridge
#

i made a service/ controller for uploading and downloading pdf's but it keeps giving me content disposition header is missing so it does not get overwritten