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
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:> 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 > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Ben Reubenstein http://www.benr75.com
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:> 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: > > 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 > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > -- > 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
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 Saiho Yuen wrote:> 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: > > >>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: >> >>>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 >>>_______________________________________________ >>>Rails mailing list >>>Rails@lists.rubyonrails.org >>> >> >>http://lists.rubyonrails.org/mailman/listinfo/rails >> >> >>-- >>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 > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails