Closed djbrooke closed 4 years ago
On S3, dataverse will redirect calls to an S3 link when you try to download the file.
By default the API for download (at least with curl) does not by follow the redirect. You have to add -L to the call. (we're currently unsure of why the tab* works, but it is the anomaly).
(*) due to ingest, it must do something differently
So basically, we think these previewers (and other external tools) should make sure to follow redirects.
If you're redirecting to S3 for downloads, you may be seeing a CORS issue unless you support that on S3.
Are you saying that the previewers already support redirects when calling the API? If so, sure we can also look re: cors on the s3 side.
I think they do because the browser does automatically. A CORS issue should be visible in the browser debug console, so you can tell before digging too far.
If you get details of what's needed at Amazon to enable CORS, let me know and I'll add it to the docs.
Aha, yes it is CORS:
Thanks @qqmyers @scolapasta @kcondon - I've requested the Harvard LTS team to allow CORS for S3 on dataverse.harvard.edu. I'll close this and update the docs if this ends up being the solution.
LTS updated the CORS settings on Harvard Dataverse and we've since enabled the previewers. Will make a PR to the docs here when I have time.
We tried to turn on previewers in dataverse.harvard.edu and were mostly not successful. We've taken them down for now.
I discussed this with @kcondon and @scolapasta and the suspicion is that it has to do with redirects (I'll ask @scolapasta to fill in the details here).
More details in https://github.com/IQSS/dataverse.harvard.edu/issues/42