Create file in Appwrite Storage

    0

    10

    Khalid Khan

    Appwrite companion cookbook

    The snippet creates a new promise from the SDK Storage class for appwrite. The first argument is the name of the file, the second argument is the file's ID, and the third argument is the document element's uploader attribute. The promise is then resolved when the user clicks the file's link.

    Shortcut: appwrite.createfile

    let promise = sdk.storage.createFile('[BUCKET_ID]', '[FILE_ID]', document.getElementById('uploader').files[0]);
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    Legal
    • Security
    • Privacy Policy
    • Code Privacy
    • Terms of Service
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.