Re: downloading dynamic images
Re: downloading dynamic images
- Subject: Re: downloading dynamic images
- From: Jonathan Rochkind <email@hidden>
- Date: Tue, 13 May 2003 11:57:45 -0500
Ah, I didn't understand that you were storing the images in the db. Okay.
The InMemoryImageElement component I included in my last message, written
by me, SHOULD work as a replacement for WOImage with the 'data' binding,
that will work fine in any situation, including images stored in the db.
But like I said, use it at your own risk (as I do!).
However, I would personally reccomend storing the images in the file system
instead of the db. The fact that the user uploads hundreds of images a day
doesn't preclude this situation. Instead of putting the actual binary image
data in the db, you put the image on the file system somewhere, and store a
path to it in the db. It shouldn't matter how many images you have, this
should work fine. The image files don't need human readable names, the
names can be automatically generated things like 1213455.gif or
whatever. Although I suppose when the user saves the image to disk he'll
get names like that too. But fixing the name is a seperate issue, whether
or not you put the file on disk.
If you are worried about security, and don't want the images in the web
server document root where anyone who knows the URL could access them...
see this thread... shoot, I can't find the URL now. We just went over this
on one list or the other. But if this is something you are interested in,
say so, and I or someone else can hopefully help you out.
--Jonathan
At 08:37 AM 5/12/2003 -0400, Tom Pelaia wrote:
Chuck,
Thanks for the info.
Keeping the images on the webserver doesn't work because our application
is an electronic logbook and the images are added by the users. Users
make hundreds of entries every week. Some of those entries have
multiple images attached. We decided to keep all data associated with
logbook entries (images, attachments and text) in a database. The
logbook works fine and images are consistently displayed correctly by
the web browsers, but some people want to archive pages and the images
don't always download properly. Sometimes they download as "wr" or
"wr.txt" with no data despite the fact the the MIME type is bound.
Other times the very same images will download properly with the proper
suffix. If this is truly a feature of the WOResourceManager intended to
protect intellectual property then it is at best inconsistent.
I would like to try your first suggestion. I'm not sure that I
understand it completely. What is the purpose of using the direct
action? The logbook is session based because we require secure
connections with tracable database access. Thus each user is assigned
an independent database connection rather than using the shared database
connection pool. Is it sufficient to bind the "key" property of the
WOImage? Could you clarify the layout for your suggestion? Thanks!
thanks,
-tom
Chuck Hill wrote:
>Welcome to WOResourceManager! You could even argue that this is a feature
>protecting your intellectual property. :-P
>
>A couple of options come to mind. One is to create a direct action to
>serve the images based on form values (e.g. name, key etc.) and bind your
>images to this. Another is to keep the images under the webserver doc root
>and just store the path in the database. The former is better for images
>that need a lot of maintenance (upload, replacement etc.), and the latter
>is better for images that don't change a lot. The latter is also more
>efficient as the webserver will be serving the images.
>
>There are several other ways too.
>
>
>Chuck
>
>
>At 04:39 PM 09/05/2003 -0400, Tom Pelaia wrote:
>
>
>>I've noticed a problem copying dynamic images off of WebObjects pages.
>>If I have a page where I display an image that I get from a database,
>>the image appears fine on the web page but the user cannot consistently
>>copy those images from the web page to their desktop or create a web
>>page archive with the image included. Most of the time the image just
>>appears with the name "wr" on the desktop and has zero bytes. Sometimes
>>(even on the very same images) the image will actually be copied
>>properly including the correct extension.
>>
>>In the web component that displays the images I allow WebObjects to
>>assign names to the images.
>>
>>Has anyone else experienced this problem before and does anyone know of
>>a solution that works consistently.
>>
>>thanks,
>>-tom
>>
>>--
>>Tom Pelaia
>>SNS Project, 701 Scarboro Road, MS-6473, Oak Ridge, TN 37830
>>phone: (865)574-6421, fax: (865)574-6617
>>_______________________________________________
>>webobjects-dev mailing list | email@hidden
>>Help/Unsubscribe/Archives:
>>
>>
>http://www.lists.apple.com/mailman/listinfo/webobjects-dev
>
>
>>Do not post admin requests to the list. They will be ignored.
>>
>>
>>
>
>--
>
>Chuck Hill email@hidden
>Global Village Consulting Inc. http://www.global-village.net
>
>
--
Tom Pelaia
SNS Project, 701 Scarboro Road, MS-6473, Oak Ridge, TN 37830
phone: (865)574-6421, fax: (865)574-6617
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.