Ok Stephan

Thanks a lot for this explain. Now I can go to right way.

Regards

Mario

2007/8/7, Stephan Beal <[EMAIL PROTECTED]>:
>
>
> On Aug 8, 1:28 am, "Mario Moura" <[EMAIL PROTECTED]> wrote:
> > What I am trying is show an image into my browser with this tag
> >
> > <img width="50" height="50" src="file:///C:/Users/example.JPG"/> into my
> > browser.
> >
> > Is it possible? or is a security lock from browsers?
>
> Both. It is possible, but only if your browser allows it.
>
> > I am using $.post()
>
> It is likely that you won't be able to POST to a JPG file. You should
> use GET. For example, on my local web server i can POST to HTML files,
> but on my hosting provider i cannot - i have to use GET for HTML
> files.
>
> > So I could send the path that user choice C:/Users/example.JPG to my php
> and
> > return <img width="50" height="50" src="file:///C:/Users/example.JPG"/>
>
> Imagine what would happen if any JavaScript could read a local file
> and then POST it back to the web site. Scary stuff.
>
> > But isnt working because browsers cant show this tag <img width="50"
> > height="50" src="file:///C:/Users/example.JPG"/>
>
> As well it should not. See above.
>
> > I can upload the file to webserver I know but will be more fast and I
> can
> > save some bandwidth traffic if I could do this. And avoid malicious
> users
> > consume my bandwidth traffic.
>
> But this feature is far more malicious than bandwidth theft.
>
> > So Jquery can show Images from file:///C:? or something like this?
>
> This is not a question of jQ, but of JavaScript and the browser's
> security settings. i would NEVER enable my browser to allow reading of
> local files. i don't even think that Firefox lets you configure it to
> do that.
>
>


-- 
Mário Alberto Chaves Moura
[EMAIL PROTECTED]
31-9157-6000

Reply via email to