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

SWORD: implement equivalent of dvn.dataDeposit.maxUploadInBytes #1043

Closed
pdurbin opened this issue Oct 31, 2014 · 2 comments
Closed

SWORD: implement equivalent of dvn.dataDeposit.maxUploadInBytes #1043

pdurbin opened this issue Oct 31, 2014 · 2 comments
Assignees
Labels

Comments

@pdurbin
Copy link
Member

pdurbin commented Oct 31, 2014

In DVN 3.x we documented the JVM option dvn.dataDeposit.maxUploadInBytes at https://github.com/IQSS/dvn/blob/3.6.1/doc/release/README_v3_6.txt this way:

6. By default, the new SWORDv2-based Data Deposit API does not limit the
size up files uploaded by clients. To limit file upload to 2 GB, for example
use the new "dvn.dataDeposit.maxUploadInBytes" JVM option in your domain.xml
like this:
<jvm-options>-Ddvn.dataDeposit.maxUploadInBytes=2147483648</jvm-options>

For backwards compatibility, we need to implement the equivalent of this JVM option (perhaps we'll store the setting in the database instead) and document it properly in the Installers Guide.

From a QA perspective, we should make sure the value is honored.

@pdurbin
Copy link
Member Author

pdurbin commented Oct 31, 2014

I turned this from a JVM option into a setting in the database. I explain the setting at https://github.com/IQSS/dataverse/blob/master/doc/Sphinx/source/Installers/dataverse-installer-main.rst#datadepositapimaxuploadinbytes but I'll also copy and paste it below:

Set DataDepositApiMaxUploadInBytes to "2147483648", for example, to limit the size of files uploaded to 2 GB.

curl -X PUT http://localhost:8080/api/s/settings/:DataDepositApiMaxUploadInBytes/2147483648

Passing to QA.

@esotiri
Copy link
Contributor

esotiri commented Nov 7, 2014

Issue resolved:

curl -X PUT http://localhost:8080/api/s/settings/:DataDepositApiMaxUploadInBytes/1073741824
and got this when trying to upload a large file.

<sword:error href="http://purl.org/net/sword/error/MaxUploadSizeExceeded" xmlns:sword="http://purl.org/net/sword/terms/"><atom:title xmlns:atom="http://www.w3.org/2005/Atom">ERROR/atom:title<atom:updated xmlns:atom="http://www.w3.org/2005/Atom">2014-11-07T16:03:23Z/atom:updated<atom:generator uri="http://www.swordapp.org/" version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"/>sword:treatmentProcessing failed/sword:treatment<atom:summary xmlns:atom="http://www.w3.org/2005/Atom">The uploaded file exceeded the maximum file size this server will accept (the file is 2944647095 bytes but the server will only accept files as large as 1073741824 bytes)/atom:summary/sword:error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants