Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented web chunk upload #342

Merged
merged 13 commits into from
Jan 31, 2022
Merged

Conversation

Meldiron
Copy link
Contributor

Snippet:

    async onChange(event: any) {
      const file: File = event.target.files[0];

      const appwrite = new Appwrite();

      appwrite
        .setEndpoint("http://localhost/v1") // Your Appwrite Endpoint
        .setProject("dev"); // Your project ID

      try {
        await appwrite.account.createAnonymousSession();
      } catch (err) {
        //OK, account is set
      }

      appwrite.storage
        // @ts-ignore
        .createFile("bb", "unique()", file, undefined, undefined, (p) => {
          console.log("P", p);
        })
        .then((f) => {
          console.log(f);
        })
        .catch((err) => {
          console.error(err);
        });
    },

Output:

CleanShot 2022-01-21 at 10 25 13
CleanShot 2022-01-21 at 10 24 52
CleanShot 2022-01-21 at 10 24 58

@lohanidamodar
Copy link
Member

@Meldiron let's switch the base to feat-preps-for-0.13

@Meldiron Meldiron changed the base branch from master to feat-preps-for-0.13 January 24, 2022 10:40
@christyjacob4
Copy link
Member

@Meldiron please resolve the conflicts.

@lohanidamodar lohanidamodar merged commit dc2c23b into feat-preps-for-0.13 Jan 31, 2022
@lohanidamodar lohanidamodar deleted the feat-large-file-web2 branch January 31, 2022 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants