-
Notifications
You must be signed in to change notification settings - Fork 541
4813 allow duplicate files #6924
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
Changes from 12 commits
f311312
cfe629d
abcaa3b
ce34432
4743b23
ca7ba78
17869df
34ce725
9b4152c
801d4bb
d1139a9
aa02d34
0cea0da
2997792
121620c
5012eb6
b24b3c2
1182c54
6fb7c93
86294eb
21a2a7f
f82ca33
a323db5
178b6a4
640325c
eec2854
0273d86
fae5dc1
d36c046
847fd62
6eddfc3
954b3b7
0328487
0e90ce8
911cd0e
c8f358f
d8dcb17
a8629f4
2d79816
70820ba
dcf2d73
1b68d11
f1f18a0
e9f24cf
dfe9af5
6af0f3e
117b321
77ad2e3
dab96ab
6e7c3b9
ea85d9f
1ebd566
f64d4c6
40701b9
9fe91e1
6eb7b52
c69ef84
9350502
54011d7
d0f5adc
36a0d76
e9d58aa
77edbb6
14d24f5
60f2750
8a3ed9b
21f98be
0e531ee
7126aaa
5522e5d
2d60309
f87c9d9
0f41e9d
8169a1b
cef57dc
031b253
a4be5eb
46badd3
90edc9e
0e99e15
d0bfd3d
82f9825
57ab613
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| We should note that duplicate files are now allowed, and installations may want to contact people now that this is available. |
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -378,9 +378,16 @@ public Response updateFileMetadata(@FormDataParam("jsonData") String jsonData, | |
| // on *new* datafiles, that haven't been saved in the database yet; | ||
| // but it should never be the case in the context of this API) | ||
| // -- L.A. Mar. 2020 | ||
| //SEK 5/2020 - we can't use checksum because it | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. rather than leave (and add) to these comments, at this point we can probably remove all (from the "not sure.." . Feel free to check with @landreev if he feels any reason these should stay?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. did you check if we can just remove? |
||
| //is no longer guaranteed to be unique. | ||
| /* | ||
| if(daf.getChecksumType().equals(df.getChecksumType()) | ||
| && daf.getChecksumValue().equals(df.getChecksumValue())) { | ||
| upFmd = testFmd; | ||
| }*/ | ||
| if(daf.equals(df)){ | ||
| upFmd = testFmd; | ||
| break; | ||
| } | ||
| } | ||
|
|
||
|
|
@@ -410,7 +417,7 @@ public Response updateFileMetadata(@FormDataParam("jsonData") String jsonData, | |
|
|
||
| } catch (Exception e) { | ||
| logger.log(Level.WARNING, "Dataset publication finalization: exception while exporting:{0}", e); | ||
| return error(Response.Status.INTERNAL_SERVER_ERROR, "Error adding metadata to DataFile" + e); | ||
| return error(Response.Status.INTERNAL_SERVER_ERROR, "Error adding metadata to DataFile: " + e); | ||
| } | ||
|
|
||
| } catch (WrappedResponse wr) { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this for checksums? if so, do we need, since we already have it on the datafile object?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We actually do need it because there's a separate list of file metadata that feed the uploaded files table and if the user deletes the duplicates we have to remove them too. I was also using it to write the success message, but since were no longer using names there I did some code simplification there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But can't you call fileMetaData.datafile.isMarkedAsDuplicate()? or something like that?