You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Example python code to add a file. This may be run by changing these parameters in the sample code:
218
218
@@ -303,6 +303,16 @@ Files
303
303
304
304
.. note:: Please note that files can be added via the native API but the operation is performed on the parent object, which is a dataset. Please see the "Datasets" endpoint above for more information.
305
305
306
+
Restrict or unrestrict an existing file where ``id`` is the database id of the file to restrict::
307
+
308
+
PUT http://$SERVER/api/files/{id}/restrict
309
+
310
+
Note that some Dataverse installations do not allow the ability to restrict files.
311
+
312
+
A more detailed "restrict" example using curl::
313
+
314
+
curl -H "X-Dataverse-key:$API_TOKEN" -X PUT -d true http://$SERVER/api/files/{id}/restrict
315
+
306
316
Replace an existing file where ``id`` is the database id of the file to replace. Note that metadata such as description and tags are not carried over from the file being replaced::
307
317
308
318
POST http://$SERVER/api/files/{id}/replace?key=$apiKey
@@ -891,6 +895,15 @@ Set the name of the cloud environment you've integrated with your Dataverse inst
891
895
892
896
``curl -X PUT -d 'Massachusetts Open Cloud (MOC)' http://localhost:8080/api/admin/settings/:CloudEnvironmentName``
893
897
898
+
:PublicInstall
899
+
+++++++++++++++++++++
900
+
901
+
Setting an installation to public will remove the ability to restrict data files or datasets. This functionality of Dataverse will be disabled from your installation.
902
+
903
+
This is useful for specific cases where an installation's files are stored in public access. Because files stored this way do not obey Dataverse's file restrictions, users would still be able to access the files even when they're restricted. In these cases it's best to use :PublicInstall to disable the feature altogether.
904
+
905
+
``curl -X PUT -d true http://localhost:8080/api/admin/settings/:PublicInstall``
Copy file name to clipboardExpand all lines: doc/sphinx-guides/source/user/dataset-management.rst
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,11 +49,13 @@ File Handling + Uploading
49
49
50
50
To upload new files to a dataset, click the "Edit" button at the top of the dataset page and from the dropdown list select "Files (Upload)" or click the "Upload Files" button above the files table in the Files tab. From either option you will be brought to the Upload Files page for that dataset.
51
51
52
-
Once you have uploaded files, you will be able to edit file metadata, restrict access to files, and/or add tags. Click "Save Changes" to complete the upload. If you uploaded a file by mistake, you can delete it before saving by clicking the checkbox to select the file, and then clicking the "Delete" button above the Files Table.
52
+
Once you have uploaded files, you will be able to edit file metadata, restrict access to files [#f1]_ , and/or add tags. Click "Save Changes" to complete the upload. If you uploaded a file by mistake, you can delete it before saving by clicking the checkbox to select the file, and then clicking the "Delete" button above the Files Table.
53
53
54
54
File upload limit size varies based on Dataverse installation. The file upload size limit can be found in the text above where files are uploaded in the application. If you have further questions, contact support for that installation by clicking on the Support link at the top of the application.
55
55
56
-
The file types listed below are supported by additional functionality, which can include downloading in different formats, subsets, file-level metadata preservation, file-level data citation; and exploration through data visualization and analysis.
56
+
The file types listed in the following sections are supported by additional functionality, which can include downloading in different formats, subsets, file-level metadata preservation, file-level data citation; and exploration through data visualization and analysis.
57
+
58
+
.. [#f1] Some Dataverse installations do not allow this feature.
57
59
58
60
Tabular Data Files
59
61
------------------
@@ -156,7 +158,7 @@ Go to the dataset you would like to edit, where you will see the listing of file
156
158
157
159
You will not have to leave the dataset page to complete these action, except for editing file metadata, which will bring you to the Edit Files page. There you will have to click the "Save Changes" button to apply your edits and return to the dataset page.
158
160
159
-
If you restrict files, you will also prompted with a popup asking you to fill out the Terms of Access for the files. If Terms of Access already exist, you will be asked to confirm them.
161
+
If you restrict files, you will also prompted with a popup asking you to fill out the Terms of Access for the files. If Terms of Access already exist, you will be asked to confirm them. Note that some Dataverse installations do not allow for file restrictions.
160
162
161
163
File Tags
162
164
---------
@@ -202,6 +204,8 @@ Restricted Files + Terms of Access
202
204
203
205
If you restrict any files in your dataset, you will be prompted by a pop-up to enter Terms of Access for the data. This can also be edited in the Terms tab or selecting Terms in the "Edit" dropdown button in the dataset. You may also allow users to request access for your restricted files by enabling "Request Access". To add more information about the Terms of Access, click on "Additional Information \[+]".
204
206
207
+
**Note:** Some Dataverse installations do not allow for file restriction.
208
+
205
209
Guestbook
206
210
---------
207
211
@@ -224,7 +228,7 @@ The panel below that is "Roles", where you can find all the roles set up in your
224
228
File-Level
225
229
----------
226
230
227
-
If you have restricted specific files the file-level permissions is where you will need to go to grant users/groups access to
231
+
If you have restricted specific files, the file-level permissions is where you will need to go to grant users/groups access to
228
232
specific restricted files. Dataset file permissions are located under Permissions in the Edit button on a dataset page.
229
233
The file permissions page has two sections: Users/Groups and Files.
0 commit comments