Re: file locations
Re: file locations
- Subject: Re: file locations
- From: Wes James <email@hidden>
- Date: Fri, 12 Nov 2004 15:30:08 -0700
On Fri, 12 Nov 2004 14:06:32 -0800, Chuck Hill <email@hidden> wrote:
>
>
>
> On Nov 12, 2004, at 1:55 PM, Wes James wrote:
> > I have a database of:
> >
> > Photographer
> > Subject
> > Notes
> > Image
> >
> > I ran the web assistant and made the image field a
> > D2WDisplayImageFromPath so that it would take the image data from the
> > data base, i.e. /slides/slide.jpg and show the picture after doing a
> > search in the db.
> >
> Is the image data (the binary image) in the database? Or just the path
> to the image on the file system? How does the image get to where it
> is?
>
The data in the data base is just the path to the file
/slides/image.jpg. I have been assuming that it is relative to the
webserver. But I have also made a hard directory with some images in
it for testing and soft link to the real file system path and these
do not work. The only thing that works is putting the files in the
resource directory.
The database field is just a string field with the
/path-on-web-server/picname. The only thing that works is picname in
the field.
>
> > Doesn't /slides/slide.jpg in the database mean get from the apache
> > server web root which is http://server/slides.jpg in a browser (This
> > is /default osx apache doc root/slides).
> >
> That is just a string. It means what you use it for. If you bind it
> to the src binding of a WOImage, it will generate HTML like
> <img src="/slides/slide.jpg">
But what type of component is WODisplayFromPath. It has another
parameter with it with "app" in it so it is like using WOImage with
the filename and framework attributes. When I was testing a plain
vanilla WOapp with WOImage I couldn't get the files to show right
unless I used only the src attribute.
> If you use it for something else, it might do something else. Don't be
> afraid to use View Source in the browser. What HTML is getting
> generated?
>
Here is a successfull file load:
<img src="/cgi-bin/WebObjects/Slides-e.woa/wr?wodata=file:......./build/Slides.woa/Contents/Resources/a4.jpg"
width="402" height="271">
Here is an error one...
<img src="/cgi-bin/WebObjects/Slides.woa/wr?wodata=ERROR_NOT_FOUND_framework_*null*_filename_slides%2Fa1.jpg">
this is using slides/a1.jpg as the db entry and slides is a soft link
to the actual directory....
> Chuck
>
thanks,
wes
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden