Fixing an issue with attachments.
This commit is contained in:
parent
d66af9f151
commit
c91f21f8e2
|
@ -90,6 +90,6 @@ exports.BaseQueryVerbs = {
|
||||||
|
|
||||||
exports.ObjectStoreBuckets = {
|
exports.ObjectStoreBuckets = {
|
||||||
BACKUPS: "backups",
|
BACKUPS: "backups",
|
||||||
APPS: "apps",
|
APPS: "prod-budi-app-assets",
|
||||||
TEMPLATES: "templates",
|
TEMPLATES: "templates",
|
||||||
}
|
}
|
||||||
|
|
|
@ -112,6 +112,8 @@ exports.upload = async ({ bucket, filename, path, type, metadata }) => {
|
||||||
const fileBytes = fs.readFileSync(path)
|
const fileBytes = fs.readFileSync(path)
|
||||||
|
|
||||||
const objectStore = exports.ObjectStore(bucket)
|
const objectStore = exports.ObjectStore(bucket)
|
||||||
|
await exports.makeSureBucketExists(objectStore, bucket)
|
||||||
|
|
||||||
const config = {
|
const config = {
|
||||||
// windows file paths need to be converted to forward slashes for s3
|
// windows file paths need to be converted to forward slashes for s3
|
||||||
Key: sanitize(filename).replace(/\\/g, "/"),
|
Key: sanitize(filename).replace(/\\/g, "/"),
|
||||||
|
|
Loading…
Reference in New Issue