Can force file download
This commit is contained in:
@ -41,7 +41,10 @@ export class FileApi {
|
||||
/**
|
||||
* Get a file download URL
|
||||
*/
|
||||
static DownloadURL(file: UploadedFile): string {
|
||||
return APIClient.backendURL() + `/file/${file.id}/download`;
|
||||
static DownloadURL(file: UploadedFile, forceDownload = false): string {
|
||||
return (
|
||||
APIClient.backendURL() +
|
||||
`/file/${file.id}/download${forceDownload ? "?download=true" : ""}`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user