Closed ptulpen closed 2 years ago
Can you create any files in the upload directory? Perhaps try something like touch /path/to/bags/test.txt
?
Hi, the writing from inside the container works
I found to issue myself :
since I need different authentication methods for interactive usage and api upload, I created different locations in the apache proxy. But only the one for interactive login I had the correct BAG_DB Path set.
The 401 was only misleading
The solution was now to combine the authentication methods for the same location as the BAG_DB path
Hello, I try to get uploads working via curl.
CSRF=$(${curlcmd} -s -L -X GET ${URL} | sed -rn 's/^.(value=|csrfToken = )"([-a-z0-9])".$/\2/p') || { echo "${URL} not accessible" ; exit 1; } CSRF=$(${curlcmd} -s -F "username=admin" -F "password=${bagpassword}" -F "_csrf=${CSRF}" -L ${URL}/signin | sed -rn 's/^.csrfToken = "([-a-z0-9])".$/\1/p') curl --key ${clientkey} --cert ${clientcertificate} -c ${cookiefile} -b ${cookiefile} -X POST -H "Content-Type: multipart/form-data" -F targetDirectory=test -F file=@test.bag ${URL}/bags/upload
Gut what I in the access log from the bagserver is "POST /bag/bags/upload HTTP/1.1" 401 713 are there any special parameters needed?