The Freenet Help Site
Licences used on this wiki
Welcome anonymous user to Freenet WikiServer
 
A container, in general Freenet terms, is a file that contains several other files. In it's current implementation, a container is a PK-ZIP (or Info-ZIP, or WinZIP but not GNU-ZIP) file that contains a few extra details regarding it's contents. See also Container Freesite.

How to make a container

Creating the ZIP

First you have to create a ZIP archive with the files you want the container to include. Make sure that the resulting file is less than 1MiB in size. FProxy can read all ZIP compression algorithms, so you should use the best available (-9 for Info-ZIP, "Best" for WinZIP). You then need to add a file called metadata to the ZIP, containing the ZIP's 'manifest'. For a more detailed information regarding it's format see For Developers.

Creating the manifest

First you must decide what Mime Type? each file inside the container will have. Once you have done that, we can move on to create the manifest. First the header:
Version
Revision=1
EndPart
Then you must create an entry for each file in the following form:
Document
Name=filename
Info.Format=Mime Type?
EndPart
The last entry should have 'End' instead of 'EndPart'. It shouldn't contain a New Line? as well (unverified).
Save this file as 'metadata', case-sensitive (unverified), and add it to you container ZIP. Make sure again that the ZIP is less than 1MiB in size. If it isn't, reduce it's size. The manifest compresses very well and shouldn't have caused the ZIP size to increase drastically. So once the ZIP is less that 1MiB in size, move to the next step.

Inserting the container

That might be the trickiest part, but once you learn how it's done, it should be a breeze in the future. Containers must be inserted with a Mime Type? of 'application/zip'. To do this you can insert with the Freenet Web Portal? selecting the Mime Type? to be ZIP. If you inert with Fuqid, you nedd to right-click the insert list and select 'Add file with additional options', select the file, selecting FProxy as insert method and putting 'application/zip' as the Mime Type?. Congratulations! You've isnerted your container.

Linking to files inside containers

Once you have your files inside the container, safely inserted into Freenet, all that's left to do is to link to them. This can be done in a similiar fashion to normal Free Site manifests (sometimes called Map Files?), by using the double-slash ('//') notations. For instance, if you inserted your container as a CHK? key, to reference a file inside it, simply request the key CHK@.../container.zip//somefile.html. That's it.