-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/dls user upload #1596 #1597
base: develop
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1597 +/- ##
===========================================
+ Coverage 96.08% 96.16% +0.07%
===========================================
Files 170 172 +2
Lines 7209 7454 +245
Branches 2260 2387 +127
===========================================
+ Hits 6927 7168 +241
- Misses 262 266 +4
Partials 20 20
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Hi, I'm going to add some comments here while I integrate the FE back into a containerised environment. It would be good to have the upload URL set as an environment variable. At the moment I believe its hard coded to Something like:
|
|
A couple of changes and questions:
|
That’s great, thanks.
1. allowedFileTypes sounds like a better way of doing this. For now, I’d say stick to the following. It would be good if these were configurable through some sort of config file, or do you have enough config to worry about?
* images files
i. JPEG (.jpg or .jpeg)
ii. PNG (.png)
iii. GIF (.gif)
iv. BMP (.bmp)
v. TIFF (.tif or .tiff)
vi. WebP (.webp)
vii. HEIF (.heic or .heif)
* hdf files
i. .hd5, .hdf5
* txt files
i. .txt -
ii. .csv
iii. .json
iv. .md - Markdown file
v. .log - Log file
2. It depends, I’m concerned about the “retry” function, will that try and upload everything again?, if so then we could get duplicate entries in ICAT. Maybe it’s safer to not commit anything if any uploads fail.
3. -
4. in the call to /commit please, let me know what’s definitely possible and I’ll update the schema to accommodate.
|
Have these changes been pushed to harbor? I'm not seeing the call to |
Hi, thanks for your comment @moonraker595 . We've moved the call to Because of this (but mostly because of another annoying quirk of uppy), we need to make separate commit calls for the initial upload and (if some files failed) for each successful retry. To do this, we need the response from the initial call to include the id of the created dataset. |
Thanks @kaperoo. The most recent change to the backend code (currently going through review) doesn't return any dataset ids, just the new datafile ids that were created ( i didn't think you needed the dataset ids at the time). So:
|
I don't think we need a separate endpoint for that. The first option you mentioned sounds great. Thanks |
Hi, this has been implemented and should be in the latest image in harbor ( |
DLS User Upload
This PR adds upload functionality to DLS tables (and cards) via Alex's upload server and Uppy framework.
Added 2 new components:
The
UploadButton
used to open the upload dialogThe upload button exists in 3 variants: text (in datafiles table), short text (for cards) and an icon.
The
UploadDialog
The UploadDialog has 2 variants, one for uploading datasets with name and description textfields, and one with just 'upload' field for the upload of datafiles.
Testing instructions
Created 2 new unit test suites:
uploadButton.component.test.tsx
uploadDialog.component.test.tsx
And one e2e:
dlsUpload.cy.ts
Also, updated DLS table/card component tests to check for the upload buttons.
Agile board tracking
connect to #1596