Skip to content

Commit

Permalink
DD-1651: m4a files are not recognized as mpeg/audio by Dataverse (#375)
Browse files Browse the repository at this point in the history
* configure previewer for mp4 (curl)

* firefox provided mp4, chrome x-m4a
  • Loading branch information
jo-pol authored Oct 10, 2024
1 parent 96e8878 commit 017073b
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions files/dataverse-previewers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,48 @@ curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin
"contentType":"audio/wav"
}'

curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin/externalTools -d \
'{
"displayName":"Play Audio",
"description":"Listen to an audio file.",
"toolName":"audioPreviewer",
"scope":"file",
"types":["preview"],
"toolUrl":"https://gdcc.github.io/dataverse-previewers/previewers/v1.2/AudioPreview.html",
"toolParameters": {
"queryParameters":[
{"fileid":"{fileId}"},
{"siteUrl":"{siteUrl}"},
{"key":"{apiToken}"},
{"datasetid":"{datasetId}"},
{"datasetversion":"{datasetVersion}"},
{"locale":"{localeCode}"}
]
},
"contentType":"audio/mp4"
}'

curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin/externalTools -d \
'{
"displayName":"Play Audio",
"description":"Listen to an audio file.",
"toolName":"audioPreviewer",
"scope":"file",
"types":["preview"],
"toolUrl":"https://gdcc.github.io/dataverse-previewers/previewers/v1.2/AudioPreview.html",
"toolParameters": {
"queryParameters":[
{"fileid":"{fileId}"},
{"siteUrl":"{siteUrl}"},
{"key":"{apiToken}"},
{"datasetid":"{datasetId}"},
{"datasetversion":"{datasetVersion}"},
{"locale":"{localeCode}"}
]
},
"contentType":"audio/x-m4a"
}'

curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin/externalTools -d \
'{
"displayName":"Play Audio",
Expand Down

0 comments on commit 017073b

Please sign in to comment.