I would like to do some image rehosting plugin, but the target server accept only uploading from a client. No link support. In the other words, I want to download image from other server and upload to another and I need to do it from a JavaScript (browser extension ).
Asked
Active
Viewed 432 times
0
-
2Yes, it is possible. what is blocking you? – Sudarshan Dec 24 '12 at 11:38
-
@Sudarshan I don't think that its possible. Could you please share how could an image be downloaded form some URL and uploaded to other without explicit user action ? – Amber Dec 24 '12 at 11:40
-
How? Image object have no any methods to get the content. – crea7or Dec 24 '12 at 11:41
-
1Exact duplicate of [Google chrome rehost image extension](http://stackoverflow.com/questions/11378630/google-chrome-rehost-image-extension). – Rob W Dec 24 '12 at 11:42
-
@RobW Please answer my query. Suppose i am in a cyber cafe where chrome has this extension. So viewing my friends album over "Facebook" would allow the photos to go to some server without my knowledge? Am i getting the concept right ? – Amber Dec 24 '12 at 11:55
-
@Amber Yes, but I would never log in with my main Google, Facebook or whatever important account in a Cyber cafe. You could look at `chrome://extensions/` to see if any extension is installed, but that's not a safeguard. In theory, malicious users could have installed a whatever they want in the main OS. – Rob W Dec 24 '12 at 11:57
-
@Amber I suppose click in context menu to select the image, but as I see the code by Rob W link, yes, it look like it can work without user interaction. – crea7or Dec 24 '12 at 11:59
-
@RobW Thanks for the information. I could have never imagine that someone could steal my photos when i am browsing over facebook. I will study this in detail. – Amber Dec 24 '12 at 12:01
-
@Amber: Why do you this is not possible? have you seen some constraints? – Sudarshan Dec 24 '12 at 12:03
-
@Sudarshan I imagine that browser is providing security to us and it wont allow tweaking such malicious items which would send an image to some other server then. As i asked RobW, this means that surfing Facebook will give away all my photos. But now i feels its plausible and that's too scary. – Amber Dec 24 '12 at 12:06
-
"target server accept only uploading from **a client**" - what is the client? If this is not a browser, you can't do the same thing by extension, because extension is an (automated) browser, unless you craft an NPAPI plugin. – Stan Dec 24 '12 at 12:51
-
thank you Rob, extension is done! – crea7or Dec 25 '12 at 07:23