Uppy: Show previously uploaded files in Uppy

Created on 22 Nov 2017  路  5Comments  路  Source: transloadit/uppy

Firstly, thank you very much for this great plugin!

I'm using multiple uppy instances with GoldenRetriever plugin. I have two problems

  1. Not all data are saved in session. So when I upload data and refresh, I don't find the new uploaded data (See gif below)

  2. If I'm using two Uppy instances with two different IDs I'm getting the error below (See gif below)

SamplesPageComponent_Host.html:1 ERROR TypeError: this.ready.then is not a function
    at IndexedDBStore.list (vendor.bundle.js:18507)
    at GoldenRetriever.loadFileBlobsFromIndexedDB (vendor.bundle.js:19017)
    at GoldenRetriever.install (vendor.bundle.js:19090)
    at Uppy.use (vendor.bundle.js:16074)
    at SamplesPageComponent.webpackJsonp.../../../../../src/app/pages/submission-pages/samples-page/samples-page.component.ts.SamplesPageComponent.ngOnInit (main.bundle.js:1971)
    at checkAndUpdateDirectiveInline (vendor.bundle.js:65801)
    at checkAndUpdateNodeInline (vendor.bundle.js:67299)
    at checkAndUpdateNode (vendor.bundle.js:67242)
    at debugCheckAndUpdateNode (vendor.bundle.js:68099)
    at debugCheckDirectivesFn (vendor.bundle.js:68040)
    at Object.eval [as updateDirectives] (SamplesPageComponent_Host.html:1)
    at Object.debugUpdateDirectives [as updateDirectives] (vendor.bundle.js:68025)
    at checkAndUpdateView (vendor.bundle.js:67209)
    at callViewAction (vendor.bundle.js:67557)
    at execEmbeddedViewsAction (vendor.bundle.js:67515)

Screen-recording gif
https://s1.gifyu.com/images/uppy.gif

Feature

Most helpful comment

Thank you for the quick reply!

Yes, Actually I'm trying to keep the uploaded data appears (I though this should be the case). Anyway the persist: true option would be perfect. I'm also trying to understand how to load the dashboard with already uploaded files if I already have the fileIDs.

E.g -

  1. Someone uploaded an article and uploaded all files related to this articles (I save filesIDs in our database)
  2. When he/she edit this article, I should be able to load those files from our database and display it in Dashboard so people can keep track of uploaded files. Is it possible?

Thanks!

All 5 comments

Thanks for reporting!

  1. Not all data are saved in session. So when I upload data and refresh, I don't find the new uploaded data (See gif below)

I'd expect there to be 0 files restored after the refresh in your gif, which clearly isn't the case, so we're doing something wrong there. It's supposed to remove files that have been fully uploaded from the store. At least, that's been the goal! (Technically, we're supposed to be removing file "sets" that have been fully uploaded--eg, dropping 3 files at once makes those 3 files a set, and pressing upload with autoProceed: false makes all files to be uploaded a single set.)

It sounds like you want to keep the files around after a refresh even if they have uploaded completely. That's not how it's currently set up but it's a valid use case so maybe we should add a persist: true (or persistCompleteFiles: true) option to support that? You'd then be responsible for removing completed files using uppy.reset() when your app is ready.

  1. TypeError: this.ready.then is not a function

ow! Yep, that's because of a mistake in the IndexedDB store. https://github.com/transloadit/uppy/pull/430 should fix it.

Thank you for the quick reply!

Yes, Actually I'm trying to keep the uploaded data appears (I though this should be the case). Anyway the persist: true option would be perfect. I'm also trying to understand how to load the dashboard with already uploaded files if I already have the fileIDs.

E.g -

  1. Someone uploaded an article and uploaded all files related to this articles (I save filesIDs in our database)
  2. When he/she edit this article, I should be able to load those files from our database and display it in Dashboard so people can keep track of uploaded files. Is it possible?

Thanks!

I wonder if this is the case for a custom provider that was mentioned earlier https://github.com/transloadit/uppy/issues/362.

The bug should have been fixed in #430, so renamed the issue, hope that鈥檚 ok.

Closing in favor of #450

Was this page helpful?
0 / 5 - 0 ratings

Related issues

anushkamds picture anushkamds  路  3Comments

mokutsu-coursera picture mokutsu-coursera  路  3Comments

evanoberholster picture evanoberholster  路  3Comments

eltercero picture eltercero  路  4Comments

risonsimon picture risonsimon  路  4Comments