0

I had written code to download file

file_path = file_url
FilePointer = open(file_path,"r")
response = HttpResponse(FilePointer,content_type='application/msword')
response['Content-Disposition'] = 'attachment; filename=NameOfFile'

return response.

How can I test this code using postman if actually a file gets download when i use this api

While React JS code on the frontend is suitable for verifying file downloads, I'm interested in confirming the same using Postman.

0 Answers0