Next: Scenario 5, Previous: Scenario 3, Up: How-to [Contents][Index]
Add a new container by providing extraction rules:
# apt-get install cowsay $ mkdir cow1 $ cowsay mheu1 > cow1/cow1.txt $ tar -zcf cow1.tgz cow1/ $ MD5_1=$(md5sum cow1/cow1.txt | cut -d' ' -f 1) $ SIZE_1=$(ls -l cow1/cow1.txt | cut -d' ' -f 5) $ MD5_2=$(md5sum cow1.tgz | cut -d' ' -f 1) $ SIZE_2=$(ls -l cow1.tgz | cut -d' ' -f 5) $ cat > cow1.cat <<EOF Document "cow1": "animal" $MD5_1:$SIZE_1 EOF $ cat > cow1.ext <<EOF (TGZ $MD5_2:$SIZE_2 => $MD5_1:$SIZE_1 cow1/cow1.txt ) EOF $ mediatex upload file cow1.tgz catalog cow1.cat rules cow1.ext \ to coll hello
Add a file with no metadata:
$ cowsay mheu2 > cow2.txt $ mediatex upload file cow2.txt to coll hello
Such incoming files still are not safe until a PUBLISHER get the file form the cache, store them somewhere and provide them from some new supports to the collection.
$ mediatex motd
Supports may be provided either as external devices :
$ mediatex add supp ex-cow1 on cow1.tgz $ mediatex add supp ex-cow1 to coll hello
or either as part of the filesystem :
$ mediatex add file cow2.txt $ mediatex add supp $PWD/cow2.txt to coll hello
Now rebuild the html catalogue, and you should have access to the new archive as seen previously (Scenario 3).
$ mediatex make coll hello
Notice: If you accept www-data
user as a PUBLISHER (see Who), the HTTP catalog provides an upload form (see HTTP) accessible from the “cache” section.