Maybe fix PNG upload bug in prod?
My hypothesis is that this missing `await` is causing prod Vercel to cut off the request before the async upload finishes. Omitting this `await` was a mistake, so I'm just adding it right in! I also add logging for the success case. That way, if this isn't actually a fix, I can at least watch the logs and confirm whether the app thinks it's getting to here.
This commit is contained in:
parent
b520d1095c
commit
197dfd4e11
1 changed files with 2 additions and 1 deletions
|
@ -38,7 +38,8 @@ async function processImage(assetType, remoteId, size, imageData) {
|
|||
const id3 = paddedId.slice(6, 9);
|
||||
const key = `${assetType}/${id1}/${id2}/${id3}/${remoteId}/${size}x${size}.png`;
|
||||
|
||||
upload("impress-asset-images", key, imageData);
|
||||
await upload("impress-asset-images", key, imageData);
|
||||
console.log(`Successfully uploaded ${key} to impress-asset-images`);
|
||||
}
|
||||
|
||||
export default async (req, res) => {
|
||||
|
|
Loading…
Reference in a new issue