-
Notifications
You must be signed in to change notification settings - Fork 490
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
404, not found when providing format=original
in Data Access API
#6408
Comments
@tainguyenbui I think you're saying that you are unable to download a file that wasn't ingested. No, this is unexpected. Many, many files are not ingested (only certain tabular formats are) and they should all be downloadable. Can you reproduce this problem on https://demo.dataverse.org ? |
Sorry @pdurbin I might have explained it wrong. I am able to download files. However, there is a behaviour that does not sound right to me. If you had a file that cannot be ingested and keeps its original extension, then when you call Of course, the above request without the |
@tainguyenbui ok, I was confused by this: Is it really a 404 in the case above? |
my bad @pdurbin, I corrected it |
@tainguyenbui thanks! It's all much more clear now. 😄 To boil it down... are you saying you'd like If so, I feel like this idea has been discussed before but I don't have any issues handy to link to. 😄 |
In this case, I do not want to modify an existing behaviour unless it makes sense to everyone. I would love to discuss and understand why it would not return the actual thanks a lot for your lightning responses @pdurbin |
@tainguyenbui well, you'll never get consensus, of course. 😄 I guess we could add a brand new query parameter rather than changing the behavior of the old one. Do you have a work around? From your comment at #6385 (comment) I'm guessing that you might be checking for the presence of fields like I'm curious if you're allowing users of https://github.com/IQSS/dataverse-client-javascript to not worry about these details. You could offer them a "download original file" feature that does some checking and gives them what they want without thinking hard about this stuff. 😄 |
@pdurbin you are very very close to the approach we have taken. We have two different endpoints in our own backend, one finishing with the path Then, I have updated the client to have a flag, 'getOriginalFile' which is currently false by default and will not append the query param Right now, we are looking at the optional properties of course, a lot of pain could be saved if this was handled at the very end 🤣 |
@tainguyenbui heads up that we poked a bit at this as part of #9374 and we think it might be fixed already. We'll leave this issue open for now until we do some more checking. |
To focus on the most important features and bugs, we are closing issues created before 2020 (version 5.0) that are not new feature requests with the label 'Type: Feature'. If you created this issue and you feel the team should revisit this decision, please reopen the issue and leave a comment. |
Not Found error, 404 is returned when attempting to download a file in its original format.
Use cases
Data has been ingested
The dataset contains at least two files, the original file and the ingested version.
For example, a
.csv
file is uploaded, Dataverse ingests the file and converts it to.tab
, keeping asoriginal
the.csv
When we download the file, we could specify whether downloading the ingested one:
GET http://$SERVER/api/access/datafile/$FileId
or
Downloading the original version
GET http://$SERVER/api/access/datafile/$FileId?format=original
The above scenario works as expected
Data has not been ingested
The dataset contains at least 1 file, the one that was uploaded
GET http://$SERVER/api/access/datafile/$FileId
GET http://$SERVER/api/access/datafile/$FileId?format=original
returns 404Questions:
original
?Notes:
The API guides already specify that the
format
query parameter is only available for tabular dataThe text was updated successfully, but these errors were encountered: