You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> If the file path is absolute, then this path will be used as is. If the file path is relative, it will be appended to the current working directory.
500
500
501
-
If the file exists, response interceptors will receive `file descriptor` as the `data` argument:
501
+
If the file exists, response interceptors will receive file content `Buffer` as the `data` argument.
502
502
503
-
`File descriptor` is an object with `path` and `file` fields that describe file location and file content.
504
-
505
-
-`path``string` path to the file. Same as `file` passed in route
506
-
-`file``Buffer` file content as binary buffer
507
-
508
-
> Note to return file descriptor from interceptor. Server will send a buffer from `data.file` with corresponding `Content-Type` and `Content-Disposition` headers.
509
-
> If you return invalid file descriptor, server will send it as json data.
503
+
`Content-Type` and `Content-Disposition` headers are set before response interceptors are called.
0 commit comments