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

How to know when an upload is in progress? #50

Closed
imagekitio opened this issue Jul 10, 2022 · 1 comment
Closed

How to know when an upload is in progress? #50

imagekitio opened this issue Jul 10, 2022 · 1 comment

Comments

@imagekitio
Copy link
Contributor

No description provided.

@imagekitio imagekitio added this to the Version 2.0.0 milestone Jul 10, 2022
@imagekitio imagekitio removed this from the Version 2.0.0 milestone Nov 30, 2023
@ankur-dwivedi
Copy link

ankur-dwivedi commented Nov 30, 2023

Utilize the onUploadProgress and onUploadStart functionalities available in the IKUpload component in version 2.0.1. For detailed information on the IKUpload component, please visit the GitHub repository. Below is an example code snippet:

<template>
  <IKUpload 
    :onUploadStart="onUploadStart" 
    :onUploadProgress="onUploadProgress"
    :tags="['tag1','tag2']"
    :responseFields="['tags']"
    :onError="onError"
    :onSuccess="onSuccess"
    customCoordinates="10,10,100,100"
  />
</template>

<script>
import { IKUpload } from "imagekitio-vue"

export default {
  name: "app",
  components: {},
  data() {
    return {};
  },
  methods: {
    onError(err) {
      console.log("Error");
      console.log(err);
    },
    onSuccess(res) {
      console.log("Success");
      console.log(res);
    }
    onUploadProgress(evt) {
      console.log("Inprogress ... ", evt);
    };
    onUploadStart(evt) {
      console.log("Upload started");
    },
  }
};
</script>

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

No branches or pull requests

2 participants