0
votes

I am receiving error message while uploading image to Google App Engine using Blobstore Python API with my Flex app from different domains.

Error message:

===================== Start Error Message ===================

Request for resource at http://myapp.mydomain.com/_ah/upload/?type=product_photo/AMmfu6ZmhTp0tjCiuKqVdv-_ujOPJ-GOPaKHg9jplu6TkcSFLkWU76uUZ2_Tct7VCaAjT2GdplZgvZr1eoRYyDgcyS6D_t79hDPM3jsZDpiIIOj75HyAj-NnXQKj0K_vb7paRKz4UHk1aoxM0hz3cc1bkirTBkBeIg/ALBNUaYAAAAAVbb5CD13OTejzwTvAbBw36cI2VKwuaMc/ by requestor from http://localhost:9080/app/MerchantWebApp.swf is denied due to lack of policy file permissions.

Connection to http://myapp.mydomain.com/_ah/upload/?type=product_photo/AMmfu6ZmhTp0tjCiuKqVdv-_ujOPJ-GOPaKHg9jplu6TkcSFLkWU76uUZ2_Tct7VCaAjT2GdplZgvZr1eoRYyDgcyS6D_t79hDPM3jsZDpiIIOj75HyAj-NnXQKj0K_vb7paRKz4UHk1aoxM0hz3cc1bkirTBkBeIg/ALBNUaYAAAAAVbb5CD13OTejzwTvAbBw36cI2VKwuaMc/ halted - not permitted from http://localhost:9080/app/MerchantWebApp.swf

IO Error (Update Coupon Image): [SecurityErrorEvent type="securityError" bubbles=false cancelable=false eventPhase=2 text="Error #2170: Security sandbox violation: http://localhost:9080/app/MerchantWebApp.swf cannot send HTTP headers to http://myapp.mydomain.com/_ah/upload/?type=product_photo/AMmfu6ZmhTp0tjCiuKqVdv-_ujOPJ-GOPaKHg9jplu6TkcSFLkWU76uUZ2_Tct7VCaAjT2GdplZgvZr1eoRYyDgcyS6D_t79hDPM3jsZDpiIIOj75HyAj-NnXQKj0K_vb7paRKz4UHk1aoxM0hz3cc1bkirTBkBeIg/ALBNUaYAAAAAVbb5CD13OTejzwTvAbBw36cI2VKwuaMc/."]

======================== End Error Message =======================

My app.yaml file:

- url: /crossdomain\.xml
  static_files: site/crossdomain.xml
  upload: site/crossdomain.xml
  http_headers:
      Access-Control-Allow-Origin: "*"

My crossdomain.xml content:

<cross-domain-policy>
  <site-control permitted-cross-domain-policies="all"/>
  <allow-http-request-headers-from domain="*"/>
  <allow-access-from domain="*" secure="false" to-ports="*" />
</cross-domain-policy>

I have no problem accessing other folders of my GAE application from my localhost:9080, the only problem is I cannot upload image from my localhost:9080 to my GAE production server (http://myapp.mydomain.com) using URLLoader (urlLoader.load(urlRequest)) from my Flex app.

It seem that the GAE admin folder "_ah/upload/" doesn't not recognise the crossdomain.xml on my root folder http://myapp.mydomain.com/crossdomain.xml

Does anyone can help?

Thank you!

Joel

1

1 Answers

0
votes

anyway I have found the solution.

In my crossdomain.xml file, I forgot to add the "header=", after adding the header="*" in it, and it just works!

<allow-http-request-headers-from domain="*"/>
<allow-http-request-headers-from domain="*" header="*" />