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

#6972 allow pdf download if "original" is selected. #7597

Merged
merged 1 commit into from Feb 12, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/main/java/edu/harvard/iq/dataverse/api/Access.java
Expand Up @@ -331,6 +331,14 @@ public DownloadInstance datafile(@PathParam("fileId") String fileId, @QueryParam
// So we need to identify when a service is being called and then let checkIfServiceSupportedAndSetConverter see if the required one exists
if (key.equals("imageThumb") || key.equals("format") || key.equals("variables") || key.equals("noVarHeader")) {
serviceRequested = true;
//In the dataset file table context a user is allowed to select original as the format
//for download
// if the dataset has tabular files - it should not be applied to instances
// where the file selected is not tabular see #6972
if("format".equals(key) && "original".equals(value) && !df.isTabularData()) {
serviceRequested = false;
break;
}
//Only need to check if this key is associated with a service
if (downloadInstance.checkIfServiceSupportedAndSetConverter(key, value)) {
// this automatically sets the conversion parameters in
Expand Down