Skip to content
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

Files: Ability to Replace a File Instead of Deleting #2290

Closed
1 task
eaquigley opened this issue Jun 25, 2015 · 32 comments
Closed
1 task

Files: Ability to Replace a File Instead of Deleting #2290

eaquigley opened this issue Jun 25, 2015 · 32 comments
Assignees
Labels
Feature: File Upload & Handling Feature: Publishing & Versions Type: Feature a feature request UX & UI: Design This issue needs input on the design of the UI and from the product owner

Comments

@eaquigley
Copy link
Contributor

eaquigley commented Jun 25, 2015

For the Provenance project, we need to determine how a user can replace a file instead of deleting the file and uploading a new one.

This relates to the backend structure (@scolapasta and @landreev) and what it looks like in the UI (@eaquigley and @mheppler)


  • Make sure group check is activated before pull request!!
@eaquigley eaquigley added Type: Feature a feature request UX & UI: Design This issue needs input on the design of the UI and from the product owner Feature: File Upload & Handling labels Jun 25, 2015
@scolapasta scolapasta modified the milestone: Candidates for 4.0.3 Jun 26, 2015
@scolapasta scolapasta modified the milestones: 4.3, Candidates for 4.2 Jul 15, 2015
@eaquigley eaquigley modified the milestones: In Design, 4.3 Sep 11, 2015
@mercecrosas mercecrosas modified the milestones: In Design, In Review Nov 30, 2015
@scolapasta scolapasta removed this from the Not Assigned to a Release milestone Jan 28, 2016
@mheppler mheppler mentioned this issue Sep 2, 2016
@djbrooke
Copy link
Contributor

djbrooke commented Sep 2, 2016

Notes from @raprasad from #3220

To support Provenance, we need to add versioning/replace functionality for DataFile objects.

Basics:

User may replace an existing dataset file with a new one:
via UI
via API
File versions are tied to dataset versions
Technical notes:

Internal storage:

DataFile will have two extra fields:
Root DataFile id
Previous DataFile id
DataFile id Root DataFile ID Previous DataFile ID
1 1 null
5 1 1
7 1 5
35 1 7

@djbrooke
Copy link
Contributor

djbrooke commented Sep 2, 2016

Mockups

@mheppler mheppler mentioned this issue Sep 7, 2016
3 tasks
@djbrooke djbrooke added this to the 4.6 - File Replace milestone Sep 9, 2016
@djbrooke djbrooke added ready and removed ready labels Sep 12, 2016
raprasad added a commit that referenced this issue Sep 19, 2016
pdurbin added a commit that referenced this issue Jan 24, 2017
pdurbin added a commit that referenced this issue Jan 24, 2017
Also "add" example to phoenix scripts.
@pdurbin
Copy link
Member

pdurbin commented Jan 26, 2017

I've been fixing bug here and there, especially for #1612 but as of yesterday morning when I merged the latest from develop into pull request #3579 I'm done messing with the branch. Since then @kcondon has been QA'ing it. I'm unassigning myself from this issue.

@kcondon
Copy link
Contributor

kcondon commented Jan 26, 2017

Issues:
x1. On file landing page for replaced file, edit button still appears, including the replace option which is not possible. Choosing any option results in an error since there is no current version for this file.
x2. Replacing a file with a different type in the UI should give the user an opportunity to not do so by presenting a popup with the info of different types. Currently just replaces with a message.
x3. Minor wording issue in error response in API: Failed to add file the dataset.
x4. Force option in file replace api endpoint that allows replacing a file with a different type is not documented
x5. Opened as #3603 Cannot replace a shape file because it is a zip file. Spoke to Raman and he indicated as designed but needs to be made to work and recommends a separate ticket.
x6. API add/replace code ignores file size upload limit. Leonid knows something about this. Update: now checks file upload size but error is uninformative: status":"ERROR","message":"There was an error when trying to add the new file. Message now fixed, added file size limit info.
7. Download tracking/ Guestbook download file does not include file id so renaming/replacing files are not trackable through that info.
8. Replace (and edit) still appears for deleted files in older versions of datasets, throws errors and in some cases creates draft datasets.

@landreev
Copy link
Contributor

  1. API add/replace code ignores file size upload limit. Leonid knows something about this.

Ok, yes, I effectively disabled the size limit check in Raman's API upload/replace framework when I was merging his code in.
Just went ahead and fixed it; please re-test.

sekmiller added a commit that referenced this issue Jan 27, 2017
@kcondon kcondon closed this as completed Jan 27, 2017
pdurbin added a commit that referenced this issue Feb 7, 2017
@djbrooke djbrooke reopened this Feb 15, 2017
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Sep 11, 2020
Back in the days of IQSS#2290 (2016), code for JSON serialization has been introduced. This has never been used, all DataFile objects are still serialized as JSON by util.JsonPrinter. Removing this 4 year old, completely unused code.

If used in the future again, this should be done based on Jakarta JSON-B.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature: File Upload & Handling Feature: Publishing & Versions Type: Feature a feature request UX & UI: Design This issue needs input on the design of the UI and from the product owner
Projects
None yet
Development

No branches or pull requests