I tried the tool to upload file to a Dataverse server that uses Handle.
java -jar DVUploader-v1.3.0-beta.jar -did=hdl:... -key=... -server=https://... myfile.txt
Instead of uploading it, it returned with an error message:
PROCESSING(F): myfile.txt
Does not yet exist on server.
Retrying request for file upload URL(s): return status was : 404
Direct Uploads are not enabled for this dataset. You should contact the Dataverse administrator or, for smaller files, consider using the less efficient -uploadviaserver flag.
Not uploaded due to error during processing: myfile.txt
As I am the admin of this Dataverse I rechecked the settings, and the DIrect Upload settings as described in S3 Direct Upload and Download are set properly. Then I checked the source code of dataverse-uploader and I found that the problem comes from a hard coded "doi:" prefix:
DVUploader.java line 969
urlString = urlString + "?persistentId=doi:" + datasetPID.substring(4) + "&key=" + apiKey + "&size=" + file.length();
^^^^ ^^^^^^^^^^^^^
I suggest to replace this line to
urlString = urlString + "?persistentId=" + datasetPID + "&key=" + apiKey + "&size=" + file.length();
I tried the tool to upload file to a Dataverse server that uses Handle.
Instead of uploading it, it returned with an error message:
PROCESSING(F): myfile.txt
Does not yet exist on server.
Retrying request for file upload URL(s): return status was : 404
Direct Uploads are not enabled for this dataset. You should contact the Dataverse administrator or, for smaller files, consider using the less efficient -uploadviaserver flag.
Not uploaded due to error during processing: myfile.txt
As I am the admin of this Dataverse I rechecked the settings, and the DIrect Upload settings as described in S3 Direct Upload and Download are set properly. Then I checked the source code of dataverse-uploader and I found that the problem comes from a hard coded "doi:" prefix:
DVUploader.java line 969
I suggest to replace this line to