Skip to content

Commit

Permalink
Merge pull request IQSS#7894 from IQSS/7823-dirindex
Browse files Browse the repository at this point in the history
7823 dirindex web browsing and docs
  • Loading branch information
kcondon authored May 28, 2021
2 parents 52fee75 + 86b70b7 commit eea5589
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions doc/sphinx-guides/source/api/native-api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -825,14 +825,20 @@ through the Dataverse application.
For example, if you have a dataset version with 2 files, one with the folder named "subfolder":
|image1|
.. |image1| image:: ./img/dataset_page_files_view.png
or, as viewed as a tree on the dataset page:
|image2|
.. |image2| image:: ./img/dataset_page_tree_view.png
The output of the API for the top-level folder (``/api/datasets/{dataset}/dirindex/``) will be as follows:
|image3|
.. |image3| image:: ./img/index_view_top.png
with the underlying html source:
Expand All @@ -851,6 +857,8 @@ with the underlying html source:
The ``/dirindex/?folder=subfolder`` link above will produce the following view:
|image4|
.. |image4| image:: ./img/index_view_subfolder.png
with the html source as follows:
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/edu/harvard/iq/dataverse/api/Datasets.java
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ public Response getFileAccessFolderView(@PathParam("id") String datasetId, @Quer

String indexFileName = folderName.equals("") ? ".index.html"
: ".index-" + folderName.replace('/', '_') + ".html";
response.setHeader("Content-disposition", "attachment; filename=\"" + indexFileName + "\"");
response.setHeader("Content-disposition", "filename=\"" + indexFileName + "\"");


return Response.ok()
Expand Down

0 comments on commit eea5589

Please sign in to comment.