q-uploader - how to reset file upload after successful upload



  • My file upload has been uploaded successfully it’s ok. But when i click form close button then it close perfectly but no empty/reset q-uploader. When i again click on the add button then showing before image in q-uplader.
    I need reset file upload after successful upload.
    Please Help Me



  • Need this feature also, a reset component method, or any way to clear the list programmatically without clicking on the check icons manually.



  • Need this feature as well. There is the @finish() event and methods called reset() / removeUploadedFiles(). How can I call this methods from @finish()?



  • I found a solution:

    Add ref and @finish to QUploader:

    <q-uploader
        :factory="getUploadFactory"
        @uploaded="uploaded"
        @finish="finished"
        ref="uploader"
        label="Add new picture"
        accept=".jpg, .png, .gif, image/*"
        class="slide-image"
        square
        dark
    />
    

    Reset QUploader:

    finished () {
        this.$refs.uploader.reset()
    }
    

Log in to reply