6 Replies Latest reply on Feb 19, 2004 3:23 PM by mcscottmc

    I can't see my pictures on my web-page!!!

    itchiban

      I'm looking for the procedure which displays my images on my HTML pages.

      Thanks a lot!!!

        • 1. Re: I can't see my pictures on my web-page!!!
          mcscottmc

          The HTML module will serve up your images as well as your html files.

          1. Login as Admin
          2. Go to Manage HTML
          3. Upload an image (ie, images/foo.jpg)
          4. Edit your HTML to have

          <img src="images/foo.jpg">


          That's it.

          Note: the HTML module's upload feature is buggy. Unfortunately when it throws an Exception it gets eaten by the code and no useful information is printed to the log or returned to the caller. I am going to submit it as a bug as soon as sorceforge gets out of maintenance mode...

          -Scott

          • 2. Re: I can't see my pictures on my web-page!!!
            itchiban

            Thanks for helping!!!
            I suppose that it's not my last question!!!

            • 3. Re: I can't see my pictures on my web-page!!!
              itchiban

              my pix are displayed excepted my wallpaper!!!!

              • 4. Re: I can't see my pictures on my web-page!!!

                you should submit a patch instead, that would help us

                • 5. Re: I can't see my pictures on my web-page!!!
                  mcscottmc

                  Do you want me to post patches here? Here is a patch. Let me know if you want me to send it elsewhere:

                  In FileEJB.StoreCommand.execute() the catch{} blocks "eat" the Exception without giving any useful information. Replace the old code:

                   try
                   {
                   // ... the business logic ....
                   }
                   catch(ObjectNotFoundException e)
                   {
                   throw new FileNotFoundException(fileId);
                   }
                   catch(Exception e)
                   {
                   throw new FileException();
                   }
                  


                  with this:

                   try
                   {
                   // ... the business logic ....
                   }
                   catch(ObjectNotFoundException e)
                   {
                   log.error("Could not find " + fileId, e);
                   throw new FileNotFoundException(fileId);
                   }
                   catch(Exception e)
                   {
                   log.error("Could not execute StoreCommand", e);
                   throw new FileException("Could not execute StoreCommand");
                   }
                  


                  Then we can actually start to debug the real reason why I sometimes cannot upload files :)

                  -Scott

                  • 6. Re: I can't see my pictures on my web-page!!!
                    mcscottmc

                    Just to follow up. After putting in the patch I tried to reproduce my errors and of course it turns out that it is user error :(

                    I sometimes forget to put the "/" at the beginning of the filename and that causes it to throw.

                    -Scott