Expect full downloadable file pathname (allow CDN)

This commit is contained in:
nemunaire 2016-02-26 01:31:00 +01:00 committed by Pierre-Olivier Mercier
parent da84a90b4f
commit ee67788d59
3 changed files with 3 additions and 5 deletions

View file

@ -2,6 +2,7 @@
BASEURL="http://localhost:8081"
BASEURI="https://srs.epita.fr/owncloud/remote.php/webdav/FIC 2016"
BASEFILE="/files"
CLOUDPASS=fic:'f>t\nV33R|(+?$i*'
new_theme() {
@ -29,7 +30,7 @@ new_file() {
EXERCICE="$2"
URI="$3"
curl -f -s -d "{\"URI\": \"$URI\"}" "${BASEURL}/api/themes/$THEME/$EXERCICE/files" |
curl -f -s -d "{\"URI\": \"${BASEFILE}${URI}\"}" "${BASEURL}/api/themes/$THEME/$EXERCICE/files" |
grep -Eo '"id":[0-9]+,' | grep -Eo "[0-9]+"
}