From 487bcd71df37b9b625c17906c72844822ab968d7 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Wed, 17 Jun 2026 11:04:28 +0530 Subject: [PATCH] Pass project header on direct Appwrite uploads --- src/Migration/Destinations/Appwrite.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Migration/Destinations/Appwrite.php b/src/Migration/Destinations/Appwrite.php index 8b47c06b7b..668f15eb6a 100644 --- a/src/Migration/Destinations/Appwrite.php +++ b/src/Migration/Destinations/Appwrite.php @@ -2073,6 +2073,7 @@ class Appwrite extends Destination "/storage/buckets/{$bucketId}/files", [ 'content-type' => 'multipart/form-data', + 'X-Appwrite-Project' => $this->projectId, ], [ 'bucketId' => $bucketId, @@ -2094,6 +2095,7 @@ class Appwrite extends Destination [ 'content-type' => 'multipart/form-data', 'content-range' => 'bytes ' . ($file->getStart()) . '-' . ($file->getEnd() == ($file->getSize() - 1) ? $file->getSize() : $file->getEnd()) . '/' . $file->getSize(), + 'X-Appwrite-Project' => $this->projectId, ], [ 'bucketId' => $bucketId, @@ -2435,6 +2437,7 @@ class Appwrite extends Destination "/functions/{$functionId}/deployments", [ 'content-type' => 'multipart/form-data', + 'X-Appwrite-Project' => $this->projectId, ], [ 'functionId' => $functionId, @@ -2456,6 +2459,7 @@ class Appwrite extends Destination 'content-type' => 'multipart/form-data', 'content-range' => 'bytes ' . ($deployment->getStart()) . '-' . ($deployment->getEnd() == ($deployment->getSize() - 1) ? $deployment->getSize() : $deployment->getEnd()) . '/' . $deployment->getSize(), 'x-appwrite-id' => $deployment->getId(), + 'X-Appwrite-Project' => $this->projectId, ], [ 'functionId' => $functionId, @@ -3066,6 +3070,7 @@ class Appwrite extends Destination "/sites/{$siteId}/deployments", [ 'content-type' => 'multipart/form-data', + 'X-Appwrite-Project' => $this->projectId, ], [ 'siteId' => $siteId, @@ -3090,6 +3095,7 @@ class Appwrite extends Destination 'content-type' => 'multipart/form-data', 'content-range' => 'bytes ' . ($deployment->getStart()) . '-' . ($deployment->getEnd() == ($deployment->getSize() - 1) ? $deployment->getSize() : $deployment->getEnd()) . '/' . $deployment->getSize(), 'x-appwrite-id' => $deployment->getId(), + 'X-Appwrite-Project' => $this->projectId, ], [ 'siteId' => $siteId,