Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
9002 allow direct upload setting #9003
9002 allow direct upload setting #9003
Changes from 2 commits
5b34065
5db560e
e4ee0d3
cbc42d5
187cc61
4abac1a
578c7af
8578de1
f2e75db
bff889d
ad4bb51
49102ad
e9d6df0
dc64aa2
085fb8f
c65cd7e
098de49
c69ce63
6d9acdb
e048dad
35436c5
94913cc
ce7ba1b
fddca51
0a16342
6da584f
1060061
03b1295
584bed4
f61da49
884d046
7bb4231
e6b7d9f
5ca942f
f5fba58
43d7419
f6bdd2a
bf42a92
d8ea581
7cd11f3
81be260
06b7255
16322df
3ecd118
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I left notes in the issue discussing whether this might be better as an allow-out-of-band option that could be moved outside of the S3 section. In that case it might be restricted to superuser if desired. In any case, it would work as in this PR w.r.t. having upload-redirect on supercedes it (you need to be able to call the /addFiles endpoint for directupload so it doesn't make sense to have upload-redirect=true and api-direct-upload (or allow-out-of-band-upload)=false.)
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.
I have renamed the option to allow-out-of-band-upload. I have also removed it from the s3 section and added this documentation in the general section:
When using integration tools, dataverse installation can be configured to allow out of band upload by setting the
dataverse.files.\<id\>.allow-out-of-band-upload
JVM option totrue
.Files can be then uploaded by an integration tool with
datasets/{id}/add
api call, or uploaded directly to the storage and registerd in a dataset afterwards using thedatasets/{id}/addFiles
api call.Notice that using S3-storage with
dataverse.files.\<id\>.upload-redirect
JVM option enabled supersedes theallow-out-of-band-upload
and will enable direct upload even withallow-out-of-band-upload
not set (or set to false).In other words,
dataverse.files.\<id\>.allow-out-of-band-upload
option opens thedatasets/{id}/add
anddatasets/{id}/addFiles
api endpoints without redirecting uploads in the UI.Enabling the
upload-redirect
option allows then direct upload automatically, without the need of enabling theallow-out-of-band-upload
(setting it tofalse
does not have any effect in that case).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.
Since direct-upload only works with S3 stores, should the base class just check out-of-band and the S3 store override this method to check both?
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.
This is a little bit confusing. It is a static method. Refactoring the code does not seem to be the best solution to me. For now, I have changed the code to this (which seems equivalent to me):