MCPcopy
hub / github.com/angular/angularfire / createUploadTask

Function createUploadTask

src/compat/storage/task.ts:25–39  ·  view source on GitHub ↗
(task: UploadTask)

Source from the content-addressed store, hash-verified

23 * multiple methods for controlling and monitoring the file upload.
24 */
25export function createUploadTask(task: UploadTask): AngularFireUploadTask {
26 const inner$ = fromTask(task);
27 return {
28 task,
29 then: task.then.bind(task),
30 catch: task.catch.bind(task),
31 pause: task.pause.bind(task),
32 cancel: task.cancel.bind(task),
33 resume: task.resume.bind(task),
34 snapshotChanges: () => inner$,
35 percentageChanges: () => inner$.pipe(
36 map(s => s.bytesTransferred / s.totalBytes * 100)
37 )
38 };
39}

Callers 1

createStorageRefFunction · 0.90

Calls 1

fromTaskFunction · 0.90

Tested by

no test coverage detected