MMBase

Image upload does not show image immediately

Details

  • Type: Improvement Improvement
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.7.0
  • Fix Version/s: 1.8.4
  • Component/s: Editwizards
  • Description:
    Hide
    original bugid: #6419
    If an image is uploaded in the edit wizards, it does not show immediately on the wizard page. This is related directly to the use of the commons file upload libraries in processuploads.jsp.

    The commons file upload module keeps the uploaded file in memory if it does not exceed a certain size limit (10240 bytes), files that exceed this limit are stored by default in 'java.io.tmpdir'. The problem is that both locations can not be served by a web server. Immediately after an image upload, the source for the wizard page contains the following (uploaded aukje.gif):

    <img height="128" width="128" border="0" vspace="0" hspace="0" src="aukje.gif">

    This does not work, since aukje.gif is not located at
    http://localhost:8080/website/mmbase/edit/wizard/jsp/aukje.gif

    The XSL that renders this URL is inside the template 'ftype-image' in wizard.xsl.

    There are two solutions for this problem:
    1. Have the commons file upload code write to a directory inside the web app. The web server can then serve the image using a simple URL.
    2. Save the binary data inside the wizard and render an image from it using the ImageRequestProcessor (which should be a singleton). I have no idea whether this is doable at all.
    Show
    original bugid: #6419 If an image is uploaded in the edit wizards, it does not show immediately on the wizard page. This is related directly to the use of the commons file upload libraries in processuploads.jsp. The commons file upload module keeps the uploaded file in memory if it does not exceed a certain size limit (10240 bytes), files that exceed this limit are stored by default in 'java.io.tmpdir'. The problem is that both locations can not be served by a web server. Immediately after an image upload, the source for the wizard page contains the following (uploaded aukje.gif): <img height="128" width="128" border="0" vspace="0" hspace="0" src="aukje.gif"> This does not work, since aukje.gif is not located at http://localhost:8080/website/mmbase/edit/wizard/jsp/aukje.gif The XSL that renders this URL is inside the template 'ftype-image' in wizard.xsl. There are two solutions for this problem: 1. Have the commons file upload code write to a directory inside the web app. The web server can then serve the image using a simple URL. 2. Save the binary data inside the wizard and render an image from it using the ImageRequestProcessor (which should be a singleton). I have no idea whether this is doable at all.

Activity

There are no subversion log entries for this issue yet.

People

Dates

  • Created:
    2004-07-07 13:11
    Updated:
    2007-01-03 21:10
    Resolved:
    2007-01-03 21:10