JSPWiki file attachments#

RefactorMe (this page is very outdated)

JSPWiki has been able to support file attachments since version 2.0.0.

Stuff that is still missing, and should be done:

  • See a shortened attachment list on the editor page.
  • Add attachments to RecentChanges and reference lists. (This should actually be quite easy).
  • I wrote up a bit of instructions in WikiAttachments - that page is going to end up in the distro (but was forgotten from 2.0.0).
  • Minor improvements: the attachments style should probably specify a slightly different background color to better separate the table from the page body. The "Attachments:" text should be within the div, or a table title.

The current code always sets the header Content-Disposition: attachment; filename=.... This causes a browser to always ask what to do with the file, even for text/html. If this is changed to Content-Disposition: inline; filename=... (in accordance with rfc 2183) the browser trys to show it in the usual way first (tested with Mozilla 1.2 and IE 6) while still presenting the correct filename if the user chooses to save the page. I would very much prefer the second solution.

(AttachmentServlet.java, line 127 :)

--TorstenH 2002-12-11

Ah, excellent. Thanks for the tip! (There is actually also a bug in IE4 I think, where you gotta spell "attachment" as "attachement" or IE will misinterpret the data...)

--JanneJalkanen, 11-Dec-2002.

Fixed in 2.0.1.

Hm. Mozilla 1.2.1 seems to want to save the incoming file as "attach", which is the servlet name. This does not sound like a good idea to me.

-- JanneJalkanen, 21-Feb-2002.


Question : how to simply display attached pictured.#

In a page : AvailablePictures, I attached
an image : xp-icon.jpg

Is there a simpler way to display it, in the base page, or any page, than using the absolute address, as in:

   [file://C:/dev/jspwiki.data/AvailablePictures-att/xp-icon.jpg/1.jpg]
--AlainRavet

Just say [xp-icon.jpg], or if you're on some other page, [AvailablePictures/xp-icon.jpg]. The latter form works in any place.

Note that you will have to have enabled .jpg-images as inline images.

--JanneJalkanen

Thanks Janne. --AlainRavet

Add new attachment

Only authorized users are allowed to upload new attachments.

List of attachments

Kind Attachment Name Size Version Date Modified Author Change note
 
1 9.1 kB 1 09-Mar-2010 08:49 116.236.168.74
pdf
Intro to ASP.pdf 20.8 kB 1 13-Sep-2010 09:58 202.73.9.106
« This page (revision-58) was last changed on 04-Jan-2008 12:42 by JanneJalkanen