How do I get a file name in a document flow interface?
CSV interface, the backend put the name in the header of the response, as follows:
content-disposition: 'attachment; Filename = file. CSV '
Access-Control-Expose-Headers
When the back end resolves cross-domain issues without access-Control-expose-headers, we can only get the following Headers
- Cache-Control
- Content-Language
- Content-Type
- Expires
- Last-Modified
- Pragma
If you want to get other response Headers, you can list them under Access-Control-expose-headers
- Exposed response header
Access-Control-Expose-Headers: Content-Disposition
- Expose multiple response headers, separated by commas
Access-Control-Expose-Headers: Content-Disposition, X-Token
So we can get the head that we want through Axios Headers
The resources