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); }