It is possible to rehost an image to local server (for example I using mysql database and wamp server) when user clicking a menu that appear while they do right click ?
Asked
Active
Viewed 151 times
0
-
Yes that's possible. See [this answer](http://stackoverflow.com/a/11382138/938089?google-chrome-rehost-image-extension) for two examples (Chrome extension). You have to create the server-side part yourself (should be trivial). – Rob W Jul 13 '12 at 10:09
-
thanks rob, but I think it's not easy for me to handle it because I'm new in programming. – dulharjo Jul 13 '12 at 13:37
-
Go try it. The only way to learn programming is by practising it. – Rob W Jul 13 '12 at 13:40
-
Rob, would you give me explanation or tutorial how to create server-side part? – dulharjo Jul 25 '12 at 13:53
-
In which server-side language? Sorry if I'm not helpful, but have you actually done some basic research (eg via a [Google search query](https://encrypted.google.com/search?q=site:stackoverflow.com+handle+file+upload))? I don't mind helping, but there's a difference between a Gimme-teh-codez-plox request and a "I have tried x and y, but I'm stuck at Z." Especially when the question has already been asked several times, and can be found within a minute. – Rob W Jul 25 '12 at 14:01
-
I'm sorry Rob if you look me like a lazy boy but honestly I'm not sure with programming, I want to do that with jquery, so if I right click on the image and choose rehost, the image will be stored to my MySql database. I have tried your examples but nothing happened when i click "rehost image" and I don't know where is the wrong. – dulharjo Jul 26 '12 at 04:35
-
The code in my answer is intended to be used with a Chrome extension. In ordinary web pages, the [same origin policy](https://developer.mozilla.org/En/Same_origin_policy_for_JavaScript) denies cross-site XHR. Change the URL to the same domain as the page, then implement the web service. – Rob W Jul 26 '12 at 08:30
-
thanks Rob, I use your second example, and its work. :D – dulharjo Jul 27 '12 at 07:54
-
Have you also created the server part? Then post is as an answer, and accept it. Others may find it useful ;) – Rob W Jul 27 '12 at 08:15
1 Answers
0
I solved my problem with creating my own upload.php that convert the image to BLOB.
I'm sorry i can't explain the detail, I'm not fluent in english. :D

dulharjo
- 13
- 5