26 Storage(
const std::string &projectId,
const std::string &apiKey);
58 const std::vector<std::string> &permissions = {},
59 bool fileSecurity =
false,
bool enabled =
true,
60 int maximumFileSize = 0,
61 const std::vector<std::string> &allowedFileExtensions = {},
62 const std::string &compression =
"none",
63 bool encryption =
false,
bool antivirus =
false);
82 const std::vector<std::string> &permissions = {},
83 bool fileSecurity =
false,
bool enabled =
true,
84 int maximumFileSize = 0,
85 const std::vector<std::string> &allowedFileExtensions = {},
86 const std::string &compression =
"none",
87 bool encryption =
false,
bool antivirus =
false);
102 std::string
getFile(
const std::string &bucketId,
const std::string &fileId);
111 const std::string &fileId);
122 const std::string &fileId,
123 const std::string &name =
"",
124 const std::vector<std::string> &permissions = {});
133 const std::string &fileId);
142 const std::string &fileId);
153 const std::string &fileName,
154 const std::string &fileContent,
155 const std::vector<std::string> &permissions);
159 std::string projectId;
Declares the base exception class used to represent Appwrite SDK errors.
Defines HTTP status code enums for consistent error and response handling.
Provides utility functions and helpers used across the SDK.
Provides methods to interact with Appwrite's Storage service.
std::string updateFile(const std::string &bucketId, const std::string &fileId, const std::string &name="", const std::vector< std::string > &permissions={})
Updates file metadata and permissions.
std::string deleteFile(const std::string &bucketId, const std::string &fileId)
Deletes a file from the bucket.
Storage(const std::string &projectId, const std::string &apiKey)
Constructs the Storage client with given project ID and API key.
std::string updateBucket(const std::string &bucketId, const std::string &name, const std::vector< std::string > &permissions={}, bool fileSecurity=false, bool enabled=true, int maximumFileSize=0, const std::vector< std::string > &allowedFileExtensions={}, const std::string &compression="none", bool encryption=false, bool antivirus=false)
Updates an existing storage bucket.
std::string createFile(const std::string &bucketId, const std::string &fileName, const std::string &fileContent, const std::vector< std::string > &permissions)
Uploads a file to the specified bucket.
std::string deleteBucket(std::string &bucketId)
Deletes a storage bucket.
std::string getFileView(const std::string &bucketId, const std::string &fileId)
Returns a file preview URL.
std::string getFile(const std::string &bucketId, const std::string &fileId)
Retrieves metadata of a specific file.
std::string getBucket(std::string &bucketId)
Retrieves metadata of a specific bucket.
std::string getFileDownload(const std::string &bucketId, const std::string &fileId)
Returns a downloadable URL for a file.
std::string listBuckets()
Lists all buckets in the project.
std::string createBucket(const std::string &bucketId, const std::string &name, const std::vector< std::string > &permissions={}, bool fileSecurity=false, bool enabled=true, int maximumFileSize=0, const std::vector< std::string > &allowedFileExtensions={}, const std::string &compression="none", bool encryption=false, bool antivirus=false)
Creates a new storage bucket.