mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-22 17:56:30 -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
6c1f72f93b
commit
1df74df65c
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