• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: file locations
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: file locations


  • Subject: Re: file locations
  • From: Chuck Hill <email@hidden>
  • Date: Fri, 12 Nov 2004 14:40:40 -0800


On Nov 12, 2004, at 2:30 PM, Wes James wrote:

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.
That entirely depends on how you use it.


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.

Its own type.  You need to check the docs (if any :-) for it.


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">



That is a WOResourceManager URL. For your purposes, it seems that managed URLs are not the way to go.


Here is an error one...

<img src="/cgi-bin/WebObjects/Slides.woa/wr? wodata=ERROR_NOT_FOUND_framework_*null*_filename_slides%2Fa1.jpg">


That is a WOResourceManager error URL.  :-)


this is using slides/a1.jpg as the db entry and slides is a soft link
to the actual directory....


What ever you are using to display those images is either (a) not intended to display non-static resources or (b) bound up incorrectly.

Chuck


--
Practical WebObjects - a book for intermediate WebObjects developers who want to increase their overall knowledge of WebObjects, or those who are trying to solve specific application development problems.
http://www.global-village.net/products/practical_webobjects




_______________________________________________
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


  • Follow-Ups:
    • Re: file locations
      • From: Wes James <email@hidden>
References: 
 >file locations (From: Wes James <email@hidden>)
 >Re: file locations (From: Chuck Hill <email@hidden>)
 >Re: file locations (From: Wes James <email@hidden>)
 >Re: file locations (From: Chuck Hill <email@hidden>)
 >Re: file locations (From: Wes James <email@hidden>)

  • Prev by Date: Re: file locations
  • Next by Date: Re: file locations
  • Previous by thread: Re: file locations
  • Next by thread: Re: file locations
  • Index(es):
    • Date
    • Thread