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 → Create Bucket
AI-generatedOverview
This node operation creates a new storage bucket in the Appwrite platform. It is useful for organizing and managing files in a cloud storage environment, allowing users to define bucket-specific settings such as permissions, file security, and file handling options. Practical applications include setting up storage for user uploads, backups, or media assets with customized access control and security features.
Use Case Examples
- Creating a new bucket for storing user profile images with specific read permissions.
- Setting up a bucket with file-level security enabled and virus scanning for uploaded documents.
Properties
| Name | Meaning |
|---|---|
| Bucket ID | The unique identifier for the storage bucket, which can be auto-generated using unique(). |
| Name | The display name of the bucket, required for identification. |
| Permissions | A JSON array of permission strings that define access control for the bucket. |
| File Security | Boolean flag to enable or disable file-level security within the bucket. |
| Enabled | Boolean flag to enable or disable the bucket itself. |
| 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 to apply to files in the bucket, with options None, Gzip, or Zstd. |
| Options.Encryption | Boolean flag to enable or disable encryption of files in the bucket. |
| Options.Antivirus | Boolean flag to enable or disable virus scanning for files in the bucket. |
Output
JSON
bucketId- The unique identifier of the created storage bucket.name- The name of the created bucket.permissions- The permissions set on the bucket.fileSecurity- Indicates if file-level security is enabled.enabled- Indicates if the bucket is enabled.optionsmaximumFileSize- 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 Appwrite API credentials are correctly configured and have permissions to create storage buckets.
- Verify that the bucket ID is unique to avoid conflicts.
- Check that the permissions JSON is correctly formatted to prevent API errors.
- If file uploads fail, verify that the maximum file size and allowed file extensions settings are appropriate.
- If encryption or antivirus scanning is enabled, ensure the Appwrite server supports these features and they are properly configured.