Commit 5af029cd authored by 神楽坂玲奈's avatar 神楽坂玲奈 Committed by GitHub

Update upload.ts

parent 0158cc65
......@@ -27,7 +27,7 @@ export const UploadImage = async (ctx: Context) => {
throw new Error('Unsupported image type');
}
const filename = `avatars/${uuid.v1()}`;
const filename = `avatars/${uuid.v1()}.${ext}`;
const result = await bucket.upload({
Bucket: config.OSS.OSS_BUCKET,
......@@ -40,4 +40,4 @@ export const UploadImage = async (ctx: Context) => {
} catch (err) {
ctx.throw(403, err);
}
};
\ No newline at end of file
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment