Actions181
- Account Actions
- Get Account
- Create Account
- Update Email
- Update Name
- Update Password
- Update Phone
- Update Status
- Get Preferences
- Update Preferences
- List Sessions
- Delete Sessions
- Get Session
- Update Session
- Delete Session
- Create Anonymous Session
- Create Email/Password Session
- Create Magic URL Session
- Create OAuth2 Session
- Create Phone Session
- Create Session from Token
- Create JWT
- Create Magic URL
- Create Phone Token
- Create Email Verification
- Update Email Verification
- Create Phone Verification
- Update Phone Verification
- Create Password Recovery
- Update Password Recovery
- Create Recovery
- Update Recovery
- Update MFA
- Create MFA Authenticator
- Update MFA Authenticator
- Delete MFA Authenticator
- Create MFA Challenge
- Update MFA Challenge
- Attribute Actions
- Avatars Actions
- Collection Actions
- Database Actions
- Document Actions
- Functions Actions
- Index Actions
- Locale Actions
- Messaging Actions
- Sites Actions
- Storage Actions
- Teams Actions
- Users Actions
Storage → Update Bucket
AI-generatedOverview
This node operation updates an existing storage bucket in the Appwrite platform. It allows users to modify bucket properties such as the bucket's name, permissions, file security settings, enabled status, and various options like maximum file size, allowed file extensions, compression method, encryption, and antivirus scanning. This operation is useful for managing storage buckets dynamically, for example, adjusting security settings or file restrictions as project requirements evolve.
Use Case Examples
- Updating a bucket to change its name and enable file-level security.
- Modifying permissions of a bucket to restrict or allow access.
- Setting file size limits and allowed file types for uploads to a bucket.
Properties
| Name | Meaning |
|---|---|
| Bucket ID | The unique identifier of the storage bucket to update. |
| Name | The new name to assign to the bucket. |
| Permissions | An array of permission strings defining access control for the bucket. |
| File Security | Boolean flag to enable or disable file-level security within the bucket. |
| Enabled | Boolean flag indicating whether the bucket is active or disabled. |
| Options.Maximum File Size | Maximum allowed file size in bytes for files uploaded to the bucket. |
| Options.Allowed File Extensions | Comma-separated list of allowed file extensions for files in the bucket; empty means all extensions allowed. |
| Options.Compression | Compression algorithm applied to files in the bucket. |
| Options.Encryption | Boolean flag to enable or disable encryption of files in the bucket. |
| Options.Antivirus | Boolean flag to enable or disable virus scanning of files in the bucket. |
Output
JSON
bucketId- The ID of the updated storage bucket.name- The updated name of the bucket.permissions- The updated permissions array for the bucket.fileSecurity- Indicates if file-level security is enabled.enabled- Indicates if the bucket is enabled.optionsmaximumFileSize- The maximum file size allowed in the bucket.allowedFileExtensions- Allowed file extensions for files in the bucket.compression- Compression algorithm used for the bucket.encryption- Indicates if encryption is enabled for files in the bucket.antivirus- Indicates if antivirus scanning is enabled for files in the bucket.
Dependencies
- Appwrite API key credential
Troubleshooting
- Ensure the Bucket ID provided is correct and exists; otherwise, the update will fail.
- Verify that the permissions array is properly formatted as JSON and contains valid permission strings.
- If file security or encryption options are enabled, confirm that the Appwrite project supports these features.
- Check that the maximum file size and allowed file extensions are set according to your storage requirements to avoid upload errors.
- Common error messages may include authentication failures if the API key is invalid or missing, or permission denied errors if the user lacks rights to update the bucket.
Links
- Appwrite Storage Update Bucket API - Official documentation for updating storage buckets in Appwrite.