Closed sash-kan closed 8 years ago
Don't know but I see with -v
that curl is doing the PUT
with Transfer-encoding: chunked
which archive.org apparently doesn't support. I guess you need to create an empty file touch /tmp/empty
and --upload-file /tmp/empty
.
@jamshid thank you, it works!
@vmbrasseur i think it makes sense to update the documentation (examples/curl-update_metadata.md).
Thanks, @sash-kan & @jamshid.
@sash-kan I agree the docs should be updated but am a bit pegged right now. Any chance of a pull request?
@sash-kan The following command allows for you to destroy and re-specify metadata without uploading a file:
curl --location \
--header 'x-archive-ignore-preexisting-bucket:1' \
--header 'x-archive-meta01-collection:opensource' \
--header 'x-archive-meta-mediatype:texts' \
--header 'x-archive-meta-title:Fancy new title' \
--header "authorization: LOW $accesskey:$secret" \
--header 'Content-Length:0' \
--request PUT \
http://s3.us.archive.org/sam-s3-test-08
I'll update examples/curl-update_metadata.md
and send a PR.
i have read examples/curl-update_metadata.md and tried:
$ curl --location \ --header 'x-archive-ignore-preexisting-bucket:1' \ --header 'x-archive-meta01-collection:opensource' \ --header 'x-archive-meta-mediatype:software' \ --header 'authorization: LOW myaccesskey:mysecretkey' \ --upload-file /dev/null \ http://s3.us.archive.org/lxfrudvd180 but received "411 Length Required" error ("A request of the requested method PUT requires a valid Content-length.").
i tried to add a header "Content-Length:0", but the error is the same.