NCEAS / metacatui

MetacatUI: A client-side web interface for DataONE data repositories
https://nceas.github.io/metacatui
Apache License 2.0
41 stars 27 forks source link

Provide a warning to the user when uploading large files #1897

Open amoeba opened 2 years ago

amoeba commented 2 years ago

@jeanetteclark mentioned in Slack today:

for anyone interested - the good news is that the webform can evidently handle ~12 GB of submissions in a single dataset just fine :rocket:! the bad news is I have to repackage and republish these tar files in a different way. makes me wish we had some kind of warning to people putting trying to upload really big files into the editor, though I'm not sure that's possible https://arcticdata.io/catalog/view/urn:uuid:9682ae3f-9ab6-4621-a4f8-ca9a4a1a7c44

We typically want to break apart large files into multiple packages or restructure the data in a more useful way but scientists often bundle all of their stuff up into large zips, tars, etc. This takes time for the person processing the submission to download the large files, break them apart, and understand their parts.

It'd be a big time saver if the submitter could be warned when they try to upload large files that they might be better off emailing the team managing the member node to start a discussion about how best to handle the submission. To do something like this we'd need:

This might relate to https://github.com/NCEAS/metacatui/issues/564 because we might not stop the upload that triggered the warning immediately (in case the user doesn't want to heed the warning) but the user might want to cancel the upload after they are warned.

laurenwalker commented 2 years ago

If the browser has access to the file size before it is fully loaded into memory, we could display a message when the file is selected/dropped into the package. We could display a message asking if the user wants to continue, with an auto "Yes" after a timeout in case the person doesn't see the message.

Lauren

On Fri, Oct 8, 2021 at 3:35 PM Bryce Mecum @.***> wrote:

@jeanetteclark https://github.com/jeanetteclark mentioned in Slack today:

for anyone interested - the good news is that the webform can evidently handle ~12 GB of submissions in a single dataset just fine 🚀! the bad news is I have to repackage and republish these tar files in a different way. makes me wish we had some kind of warning to people putting trying to upload really big files into the editor, though I'm not sure that's possible https://arcticdata.io/catalog/view/urn:uuid:9682ae3f-9ab6-4621-a4f8-ca9a4a1a7c44

We typically want to break apart large files into multiple packages or restructure the data in a more useful way but scientists often bundle all of their stuff up into large zips, tars, etc. This takes time for the person processing the submission to download the large files, break them apart, and understand their parts.

It'd be a big time saver if the submitter could be warned when they try to upload large files that they might be better off emailing the team managing the member node to start a discussion about how best to handle the submission. To do something like this we'd need:

  • A place in the UI to put a warning. A modal? An indicator on the DataItemView for the file? A banner up top like we already do?
  • Config options to...
    • Turn the warning on and off (default: off)
    • Configure the size threshold
    • (Maybe?) Override the message we display
  • To avoid warning the user over and over again. Maybe persist some state to localStorage or a cookie and use that state to only show the warning once

This might relate to #564 https://github.com/NCEAS/metacatui/issues/564 because we might not stop the upload that triggered the warning immediately (in case the user doesn't want to heed the warning) but the user might want to cancel the upload after they are warned.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/NCEAS/metacatui/issues/1897, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSV4FQDYCHLJBU3BUV2QMLUF5BZ5ANCNFSM5FUI2TJA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

-- National Center for Ecological Analysis and Synthesis (NCEAS) University of California Santa Barbara (UCSB)

amoeba commented 2 years ago

You get access to the file size immediately so that idea should work fine.