[Sputnik-list] How to attach a binary file to a node?

Yuri Takhteyev yuri at sims.berkeley.edu
Wed Dec 17 08:02:01 GMT+2 2008

> Is there a way to attach a binary file to a node? Basically, I need to attach .pdf or .doc/.odt files to some pages in my wiki. I read a thread on it in maillist archive (March'08), but truly speaking I did not understand if such feature was implemented or not...

You cannot "attach" a binary file to a node, but you can make a node
represent a binary file. You do this by choosing the appropriate
prototype, which in this case is "@Binary_File".

Go to a new node, e.g. "Test" and click "edit". Go to "Advanced
Options" and put "@Binary_File" in "Prototype". Click "save". You will
then see a different edit form, which will allow you to upload a file.
("File to upload".) Save again. You pdf file will now available as
"Test.download". If you upload an image, you can also link to it as
Test.jpg (or Test.png, depending on the format). For instance,
http://sputnik.freewisdom.org/en/logo.png is a node. To see it as a
node, just go to http://sputnik.freewisdom.org/en/logo.

If you want to make it look like the binary file "belongs" to some
node, you can make it a child of that node.  E.g., if you have a node
called "Test", you can call your binary node "Test/PDF_Version" and
link to it as "Test/PDF_Version.download". You can do this to many
binary files if you want: "Test/A", "Test/B", etc.

  - yuri


More information about the Sputnik-list mailing list