Skip to content

Commit 78bc5a5

Browse files
committed
CORS must be allowed on the S3 bucket #9095
1 parent 4cdf9a8 commit 78bc5a5

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

doc/sphinx-guides/source/developers/big-data-support.rst

+11-1
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,20 @@ At present, one potential drawback for direct-upload is that files are only part
3636

3737
``./asadmin create-jvm-options "-Ddataverse.files.<id>.ingestsizelimit=<size in bytes>"``
3838

39+
.. _cors-s3-bucket:
3940

40-
**IMPORTANT:** One additional step that is required to enable direct uploads via a Dataverse installation and for direct download to work with previewers is to allow cross site (CORS) requests on your S3 store.
41+
Allow CORS for S3 Buckets
42+
~~~~~~~~~~~~~~~~~~~~~~~~~
43+
44+
**IMPORTANT:** One additional step that is required to enable direct uploads via a Dataverse installation and for direct download to work with previewers and direct upload to work with dvwebloader (:ref:`folder-upload`) is to allow cross site (CORS) requests on your S3 store.
4145
The example below shows how to enable CORS rules (to support upload and download) on a bucket using the AWS CLI command line tool. Note that you may want to limit the AllowedOrigins and/or AllowedHeaders further. https://github.com/gdcc/dataverse-previewers/wiki/Using-Previewers-with-download-redirects-from-S3 has some additional information about doing this.
4246

47+
If you'd like to check the CORS configuration on your bucket before making changes:
48+
49+
``aws s3api get-bucket-cors --bucket <BUCKET_NAME>``
50+
51+
To proceed with making changes:
52+
4353
``aws s3api put-bucket-cors --bucket <BUCKET_NAME> --cors-configuration file://cors.json``
4454

4555
with the contents of the file cors.json as follows:

doc/sphinx-guides/source/installation/config.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -2730,7 +2730,7 @@ The URL for your Repository Storage Abstraction Layer (RSAL) installation. This
27302730
This setting controls which upload methods are available to users of your Dataverse installation. The following upload methods are available:
27312731

27322732
- ``native/http``: Corresponds to "Upload with HTTP via your browser" and APIs that use HTTP (SWORD and native).
2733-
- ``dvwebloader``: Corresponds to :ref:`folder-upload`. Note that ``dataverse.files.<id>.download-redirect`` must be set to "true" on an S3 store for this method to show up in the UI. In addition, :ref:`:WebloaderUrl` must be set.
2733+
- ``dvwebloader``: Corresponds to :ref:`folder-upload`. Note that ``dataverse.files.<id>.upload-redirect`` must be set to "true" on an S3 store for this method to show up in the UI. In addition, :ref:`:WebloaderUrl` must be set. CORS allowed on the S3 bucket. See :ref:`cors-s3-bucket`.
27342734
- ``dcm/rsync+ssh``: Corresponds to "Upload with rsync+ssh via Data Capture Module (DCM)". A lot of setup is required, as explained in the :doc:`/developers/big-data-support` section of the Developer Guide.
27352735

27362736
Out of the box only ``native/http`` is enabled and will work without further configuration. To add multiple upload method, separate them using a comma like this:

0 commit comments

Comments
 (0)