diff --git a/src/routes/docs/products/storage/quick-start/+page.markdoc b/src/routes/docs/products/storage/quick-start/+page.markdoc index 8d9cb5f34f..5e530a184e 100644 --- a/src/routes/docs/products/storage/quick-start/+page.markdoc +++ b/src/routes/docs/products/storage/quick-start/+page.markdoc @@ -20,7 +20,7 @@ To upload a file, add this to your app. For web apps, you can use the File objec {% multicode %} ```client-web - import { Client, Storage } from "appwrite"; + import { Client, Storage, ID } from "appwrite"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') @@ -52,19 +52,10 @@ To upload a file, add this to your app. For web apps, you can use the File objec const storage = new sdk.Storage(client); - // If running in a browser environment, you can use File directly - const browserFile = new File(['hello'], 'hello.txt'); - await storage.createFile({ - bucketId: '', - fileId: ID.unique(), - file: browserFile - }); - - // If running in Node.js, use InputFile const nodeFile = InputFile.fromPath('/path/to/file.jpg', 'file.jpg'); await storage.createFile({ bucketId: '', - fileId: ID.unique(), + fileId: sdk.ID.unique(), file: nodeFile }); ```