fix: Unable to store/read in avatars bucket with local file system storage

closes #5873
This commit is contained in:
Tom Moor
2023-09-23 15:00:48 -04:00
parent 5c7c9ceeb1
commit 65d3c8309e
6 changed files with 48 additions and 25 deletions

View File

@@ -7,6 +7,7 @@ import {
} from "@shared/types";
import { traceFunction } from "@server/logging/tracing";
import { Collection, Event, Team, User, FileOperation } from "@server/models";
import { Buckets } from "@server/models/helpers/AttachmentHelper";
type Props = {
collection?: Collection;
@@ -19,8 +20,7 @@ type Props = {
};
function getKeyForFileOp(teamId: string, name: string) {
const bucket = "uploads";
return `${bucket}/${teamId}/${uuidv4()}/${name}-export.zip`;
return `${Buckets.uploads}/${teamId}/${uuidv4()}/${name}-export.zip`;
}
async function collectionExporter({