From b3819186cb9abe4ced00afd0b8c40ff98b3a4813 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Tue, 9 Jan 2024 15:38:56 +1300 Subject: [PATCH] Fix chunked upload file ID validation for first chunk --- app/controllers/api/storage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index 88898d9add..c7edf5599b 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -458,7 +458,7 @@ App::post('/v1/storage/buckets/:bucketId/files') } $idValidator = new UID(); - if (!$idValidator->isValid($request->getHeader('x-appwrite-id'))) { + if (!$idValidator->isValid($fileId)) { throw new Exception(Exception::STORAGE_INVALID_APPWRITE_ID); }