Same origin policy means that you can't do real XHR to a remote server, but there are a few workarounds:
1. Use the local server as a proxy. Do an XHR post to the local server, and then have that server turn around and post the data to the central server. 2. Use a script tag instead of XHR. This is a good technique for cross- site javascript when the request data is simple, but since you're limited to using the query string, it's not a good solution for sending actual files. 3. Use a hidden form and iframe. Do all your image manipulation locally, then if you need to send something to a remote server, base64 the blob, attach that to a form and post to an iframe. On Oct 17, 7:25 am, Jordan <[email protected]> wrote: > I put the upload pages at the local server, and I will load the page > in an IFRAME, but I dont like this method, beacuse I will need copy > the application software, and to do changes i will need to update all > the servers and check them. > > If anybody knows how to do with the external calls, I will be very > happy. > > On 14 oct, 09:55, Jordan <[email protected]> wrote: > > > > > I am using Google Gears and Desktop to select multiple images. > > I reduce the size with canvas, and upload to our company web server. > > (to save time, I reduce and upload instead of upload and reduce and is > > working fine) > > > Now I have to store the thumbnailed image and the full size images at > > the central server. > > To don't lose the saved upload time, as I have multiple offices with a > > local server for each office, > > I thought to send the thumbnail to the web server, and the full size > > image to the lan server and syncronize with another software. > > > But for "security reasons" the xmlhttprequest cant be sent to a > > different server that one the javascript runing server. > > > I am trying to do the next : > > MyPC -> PickFiles (only one time) > > Send ThumbSize to -> WebServer > > Send FullSize to -> LocalServer > > > Some ideas ?? > > > I tried with a form and an input file type, but I cant set the origin > > of the input ("security reasons" again), and I won't select the files > > one by one as I don't know the number of images. > > > Thanks to all.
