Page MenuHomeSoftware Heritage

create_deposit_with_metadata.sh
No OneTemporary

create_deposit_with_metadata.sh

#!/usr/bin/env bash
. ./default-setup
ARCHIVE=${1-'../../deposit.zip'}
ATOM_ENTRY=${2-'../../atom-entry.xml'}
NAME=$(basename $ARCHIVE)
MD5=$(md5sum $ARCHIVE | cut -f 1 -d' ')
PROGRESS=${3-'false'}
curl -i --user "${CREDS}" \
-F "file=@${ARCHIVE};type=application/zip;filename=payload" \
-F "atom=@${ATOM_ENTRY};type=application/atom+xml;charset=UTF-8" \
-H "In-Progress: ${PROGRESS}" \
-H 'Slug: some-external-id' \
-XPOST ${SERVER}/1/${COLLECTION}/

File Metadata

Mime Type
text/x-shellscript
Expires
Jun 4 2025, 7:46 PM (11 w, 6 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3399370

Event Timeline