Forum: Ruby on Rails image doesn't show (rhtml path???)

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
14b7344777a56ac9a1fad849f5d6da2a?d=identicon&s=25 sayoyo Sayoyo (sayoyo)
on 2006-03-16 17:31
(Received via mailing list)
Hi,

we try to show an image which is not inside the rails
framework, and we are not able to see the image!!!!
does someone know how to do this???

our rails is installed on

/opt/rails/project1/, so inside "project1" we have all
the rails directory like "app", "public", etc.)

our image is on the "/usr/images/"

so in our link on the rhtml. we use a link like:

<img src="../../usr/images/myimage.jpg">, however, we
were never able to see the image!!!!

but when we put the image inside the rails framework,
we is able to see the image??

Why we are not able to link image outside of the rails
framework???

Thanks youv very much

Saiho



The mind is its own place, and in itself.
Can make a Heaven of Hell, a Hell of Heaven.

http://www.geocities.com/sayoyo/

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
D90ef6808433e63203e15a5c2dadb0bb?d=identicon&s=25 Ben Reubenstein (Guest)
on 2006-03-16 17:44
(Received via mailing list)
Saiho ~

The user that runs the webserver does not have permission to access
that file, it would be a huge security hole if it could.  You need to
have images in public/images.

~ Ben

On 3/16/06, Saiho Yuen <sayoyo@yahoo.com> wrote:
>
> Why we are not able to link image outside of the rails
>
>
--
Ben Reubenstein
http://www.benr75.com
14b7344777a56ac9a1fad849f5d6da2a?d=identicon&s=25 sayoyo Sayoyo (sayoyo)
on 2006-03-16 17:50
(Received via mailing list)
If the security is not a problem(the folder contains
only images) so can I simply change the the folder
right?



--- Ben Reubenstein <benr@x-cr.com> wrote:

> On 3/16/06, Saiho Yuen <sayoyo@yahoo.com> wrote:
> > /opt/rails/project1/, so inside "project1" we have
> >
> > Saiho
> > Tired of spam?  Yahoo! Mail has the best spam
> --
> Ben Reubenstein
> http://www.benr75.com
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


The mind is its own place, and in itself.
Can make a Heaven of Hell, a Hell of Heaven.

http://www.geocities.com/sayoyo/

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
4005a47a8f2ceee49670b920593c1d52?d=identicon&s=25 Ben Munat (Guest)
on 2006-03-17 08:29
(Received via mailing list)
If you're running this under a webserver (apache or lighty), you can
configure a directory
in the file system to be available under a certain path for a given
host. Look at the docs
for your server to see how to do that.

But putting a filesystem path in an html img tag is never gonna work...
and it shouldn't.
That would be a terrible security hole to just be able to enter any file
path into an html
tag.

b
This topic is locked and can not be replied to.