Created
August 12, 2021 05:30
-
-
Save vpontis/84b79108c4ffacbcf146e5bf6e77661e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/next/utils/upload-file-to-s3.ts b/next/utils/upload-file-to-s3.ts | |
index c8374943b..5e9d4ef37 100644 | |
--- a/next/utils/upload-file-to-s3.ts | |
+++ b/next/utils/upload-file-to-s3.ts | |
@@ -1,4 +1,4 @@ | |
-import { S3Bucket, S3FolderName } from "@luma-team/shared"; | |
+import { S3Bucket, S3FolderName, sleep } from "@luma-team/shared"; | |
import axios from "axios"; | |
import { ZmClient } from "./ZmClient"; | |
@@ -26,8 +26,11 @@ export const uploadFileToS3 = async ({ | |
throw new FileTooBigError(); | |
} | |
+ await sleep(10_000); | |
+ | |
const { upload_url, file_url, file_key } = await ZmClient.post( | |
- "/cdn/create-presigned-url", { | |
+ "/cdn/create-presigned-url", | |
+ { | |
folder, | |
contentType: file.type, | |
bucket, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment