Skip to content

Commit e36ab6a

Browse files
authored
fix(storage-gcs): client uploads are enabled even if clientUploads is not set (#11527)
Client uploads were always enabled because a wrong variable was used, when passing `enabled` to `initClientUploads`, `gcsStorageOptions.enabled` instead of `gcsStorageOptions.clientUploads` To enable client uploads with GCS you also additionally need to configure CORS on Google Cloud, therefore this change breaks existing logic
1 parent bacc0f0 commit e36ab6a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/storage-gcs/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export const gcsStorage: GcsStoragePlugin =
7272
clientHandler: '@payloadcms/storage-gcs/client#GcsClientUploadHandler',
7373
collections: gcsStorageOptions.collections,
7474
config: incomingConfig,
75-
enabled: !isPluginDisabled && Boolean(gcsStorageOptions.enabled),
75+
enabled: !isPluginDisabled && Boolean(gcsStorageOptions.clientUploads),
7676
serverHandler: getGenerateSignedURLHandler({
7777
access:
7878
typeof gcsStorageOptions.clientUploads === 'object'

0 commit comments

Comments
 (0)