question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Restart a Cancelled Upload

See original GitHub issue

Hi, how can I restart a cancelled file from queue? I have tried the uploadFile event, but it has two problems .

  1. The event has to be emitted twice for the upload to start again.

  2. The cancel even stops working after this and the whole file is uploaded no matter how many times you emit cancel.

Therefore, please help.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:2
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
jkuricommented, Aug 7, 2018

hi @ar27111994 and sorry for super late response. It is maintained but currently I am very busy with other stuff. The problem you described is a known issue and I will try to fix that till the end of this week.

0reactions
antrikshpatelcommented, Sep 27, 2019

A solution that worked for me in case of restarting the upload was to add a reference on the component

<input
      #fakeUpload
      type="file"
      ngFileSelect
      [options]="options"
      [uploadInput]="uploadInput"
      (uploadOutput)="onUploadOutput($event)"
    />

and then right before creating the event for this.uploadInput.emit(event); I’ve manually trigger a change event on that reference.

const ev = new Event('change');    
this.fakeUploadInput.nativeElement.dispatchEvent(ev);
const event: UploadInput = {
      file: this.file,
      headers: {
        Authorization: `JWT ${token}`
      },
      method: 'POST',
      type: 'uploadAll',
      url: this.url
    };
this.uploadInput.emit(event);

I tried your suggestion. The problem i faced is it adds duplicate files to the list.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can I continue an upload to YouTube that was interrupted?
You can cancel the upload and whenever you want you can go to upload manager and select the same file and resume the...
Read more >
Cannot Cancel Upload - Google Drive Community
To do this on Android, go to “Settings -> Apps & notifications -> See all apps.” Find Drive in the list, tap “Force...
Read more >
How to resume a Youtube video upload
... videos and slow internet connections to upload your videos to Youtube. With this tip you will be able to resume your uploads...
Read more >
Resuming a large video uploading on Youtube
If you had to abandon your upload for any reason, you have up to 24 hours to continue uploading where you left off.You...
Read more >
How to Resume a Google Drive Upload: 5 Steps (with Pictures)
1. Open Drive on your smartphone or tablet. If you’re using an iPhone, you’ll usually find it on the home screen. If you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found