Mercurial > hg > LGDataverses
diff scripts/api/data-deposit/delete-file @ 10:a50cf11e5178
Rewrite LGDataverse completely upgrading to dataverse4.0
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Tue, 08 Sep 2015 17:00:21 +0200 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/api/data-deposit/delete-file Tue Sep 08 17:00:21 2015 +0200 @@ -0,0 +1,14 @@ +#!/bin/bash -x +USERNAME=spruce +PASSWORD=spruce +DVN_SERVER=localhost:8181 +if [ -z "$1" ]; then + FILE_ID=`scripts/api/data-deposit/show-files | cut -d'/' -f1` + #echo $FILE_ID + #exit +else + FILE_ID=$1 +fi +#curl --insecure -X DELETE https://$DVN_SERVER/api/datasets/$DATABASE_ID?key=$USERNAME +curl --insecure -i -X DELETE https://$USERNAME:$PASSWORD@$DVN_SERVER/dvn/api/data-deposit/v1/swordv2/edit-media/file/$FILE_ID +#| xmllint -format -