mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-23 18:26:32 -05:00
FileMediaBackend: Fix generated urls
All urls should be of the form `uploads/<filename>.<extension>` regardless of what the uploadDirectory is, because the backend proxies all locally uploaded files. Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
parent
c821fe6f04
commit
4fb7623225
1 changed files with 1 additions and 1 deletions
|
@ -36,7 +36,7 @@ export class FilesystemBackend implements MediaBackend {
|
|||
await this.ensureDirectory();
|
||||
try {
|
||||
await fs.writeFile(filePath, buffer, null);
|
||||
return ['/' + filePath, null];
|
||||
return ['/uploads/' + fileName, null];
|
||||
} catch (e) {
|
||||
this.logger.error((e as Error).message, (e as Error).stack, 'saveFile');
|
||||
throw new MediaBackendError(`Could not save '${filePath}'`);
|
||||
|
|
Loading…
Reference in a new issue