Skip to content

Commit 83d50d5

Browse files
fixes
1 parent d1aab46 commit 83d50d5

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/routes/docs/products/storage/quick-start/+page.markdoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ To upload a file, add this to your app. For web apps, you can use the File objec
147147
use appwrite::Client;
148148
use appwrite::services::storage::Storage;
149149
use appwrite::input_file::InputFile;
150+
use appwrite::id::ID;
150151

151152
#[tokio::main]
152153
async fn main() -> Result<(), Box<dyn std::error::Error>> {
@@ -160,7 +161,7 @@ To upload a file, add this to your app. For web apps, you can use the File objec
160161
let file = InputFile::from_path("/path/to/file.jpg", None).await?;
161162
let result = storage.create_file(
162163
"<BUCKET_ID>",
163-
"unique()",
164+
ID::unique(),
164165
file,
165166
None, // permissions (optional)
166167
).await?;

src/routes/docs/products/storage/upload-download/+page.markdoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ You can also upload files programmatically using our SDKs:
154154
use appwrite::Client;
155155
use appwrite::services::storage::Storage;
156156
use appwrite::input_file::InputFile;
157+
use appwrite::id::ID;
157158

158159
#[tokio::main]
159160
async fn main() -> Result<(), Box<dyn std::error::Error>> {
@@ -167,7 +168,7 @@ You can also upload files programmatically using our SDKs:
167168
let file = InputFile::from_path("/path/to/file.jpg", None).await?;
168169
let result = storage.create_file(
169170
"<BUCKET_ID>",
170-
"unique()",
171+
ID::unique(),
171172
file,
172173
None, // permissions (optional)
173174
).await?;

0 commit comments

Comments
 (0)