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.
sayoyo S. (Guest)
on 2006-03-16 18: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
Ben R. (Guest)
on 2006-03-16 18: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 Y. <removed_email_address@domain.invalid> wrote:
>
> Why we are not able to link image outside of the rails
>
>
--
Ben R.
http://www.benr75.com
sayoyo S. (Guest)
on 2006-03-16 18: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 R. <removed_email_address@domain.invalid> wrote:

> On 3/16/06, Saiho Y. <removed_email_address@domain.invalid> wrote:
> > /opt/rails/project1/, so inside "project1" we have
> >
> > Saiho
> > Tired of spam?  Yahoo! Mail has the best spam
> --
> Ben R.
> http://www.benr75.com
> _______________________________________________
> Rails mailing list
> removed_email_address@domain.invalid
> 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
Ben M. (Guest)
on 2006-03-17 09: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.