14 messages in com.googlegroups.google-picasa-data-apiRe: content type of http://photos.goo...
FromSent OnAttachments
Ivo20 Mar 2008 11:22 
Sven20 Mar 2008 11:31 
Ivo20 Mar 2008 13:39 
Dee Volume26 Mar 2008 05:05 
Jeff Fisher (Google)26 Mar 2008 09:29 
Dee Volume26 Mar 2008 10:30 
Jeff Fisher (Google)31 Mar 2008 17:17 
Michal Gron31 Mar 2008 23:57 
Dee Volume01 Apr 2008 01:04 
Michal Gron01 Apr 2008 01:11 
Dee Volume01 Apr 2008 01:32 
Dee Volume03 Apr 2008 06:41 
Dee Volume03 Apr 2008 06:42 
Jeff Fisher (Google)03 Apr 2008 11:07 
Subject:Re: content type of http://photos.googleapis.com/crossdomain.xml
From:Michal Gron (mich@gmail.com)
Date:03/31/2008 11:57:41 PM
List:com.googlegroups.google-picasa-data-api

You are right.. this works great for Actionscript 2 and the MovieClipLoader. But with Actionscript 3 you have to load images e.g. with flash.display.Loader because:

*Note:* The ActionScript 2.0 MovieClipLoader and LoadVars classes are not used in ActionScript 3.0. The Loader and URLLoader classes replace them.

and than:

If the loaded content is an image, its data cannot be accessed by a SWF file outside of the security sandbox, unless the domain of that SWF file was included in a cross-domain policy file at the origin domain of the image.

Taken from: http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/Loader.html

I've an API for picasa, both versions (AS2 and AS3). There is no problem with the AS2.

With AS3, the flash.display.Loader.load has second parameter LoaderContext [ http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/system/LoaderContext.html] where we can setup if the crossdomain.xml should be checked before loading. this does the fix with flickr, but i've tried with picasa and no luck..

Michal

On Tue, Apr 1, 2008 at 2:17 AM, Jeff Fisher (Google) <api.@google.com> wrote:

Hi Dee,

I think I misunderstood how Flash's security restrictions work with images. You should be able to load the images (cross domain even!) using MovieClipLoader. Here's an example of how to do it:

http://www.flash-creations.com/notes/dynamic_loadjpg.php

Cheers, -Jeff

On Mar 26, 10:30 am, Dee Volume <volu@googlemail.com> wrote:

will do - much appreciated

On Mar 26, 4:29 pm, "Jeff Fisher (Google)" <api.@google.com> wrote:

Hi Dee,

This is some fallout from thecrossdomain.xml file moving to the new domain, I'll see if we can find a way to allowFlashto access images on Picasa Web Albums. Please file a bug report for updates on this:

Cheers, -Jeff

On Mar 26, 5:05 am, Dee Volume <volu@googlemail.com> wrote:

I've got problems with this - I was happily building my picasa-powered "portfolio" site - running nicely locally, hadnt even thought about crossdomainstuff - uploaded tohttp://www.flohmedia.com/--testing/floh/portflohlio.html (not a typo :) ) and xml wouldnt load.

I went back and implemented in the AS3, Security.loadPolicyFile("http://photos.googleapis.com/data/ crossdomain.xml"); No joy, still got security sandbox violation errors popping up in the flash9 debug player.

Thought about it, my tiny brain tried to fathom how loading a cross domain policy file from a googleapis.com subdomain was pertinent to my then requesting xml from http://picasaweb.google.com/-surelyit isnt?

So potluck, tried changing the

feedhttp://photos.googleapis.com/data/feed/api/user/flohmedia?kind=album

Which worked - identical atomfeed to picasaweb.com/google.com/data/ feed etc

BUT, the individual images in picasa are coming from a google.com subdomain and they wont load... and obviously thecrossdomainpolicy file is not from google.com I got this error in the debug player

Loader.content:http://www.flohmedia.com/--testing/floh/portflohlio.swf

cannot accesshttp://lh4.google.com/flohmedia/R-jl62g1n6E/AAAAAAAAAMk/cda9YgpfjCs/s.... A policy file is required, but the checkPolicyFile flag was not set when this media was loaded.

So, I went back and true enough I hadnt used a LoaderContext object, with checkPolicyFile set to true, so I did this, and came to my current brickwall,

Loader.content:http://www.flohmedia.com/--testing/floh/portflohlio.swf

cannot accesshttp://lh4.google.com/flohmedia/R-jl62g1n6E/AAAAAAAAAMk/cda9YgpfjCs/s.... No policy files granted access.

"No policy files granted access" ....

Now what? A PHP Proxy to grab all the images from google.com and serve them to myflashfile from its own server seems crazy. Surely this is surmountable. What am I missing???

Gutted. Till this point everything was going super smoothly

On Mar 20, 8:39 pm, Ivo <iple@gmail.com> wrote:

Yep, this is what I needed.

Thanks!

- Ivo

On Mar 20, 11:31 am, Sven <s.@google.com> wrote:

Hi Ivo,

To access the Picasa Data API viaflash, you want to use thehttp://photos.googleapis.com/data/crossdomain.xmlfile. That file has the correct permissions and the correct content type.

Let me know if that solves your problem!

-Sven

2008/3/20 Ivo <iple@gmail.com>:

Hello,

Seems the filehttp://photos.googleapis.com/crossdomain.xmlisserved with the content-type text/xml but it has a meta-policy of <site- control permitted-cross-domain-policies="by-content-type" /> .

According to this

https://store2.adobe.com/devnet/flashplayer/articles/secure_swf_apps_...

thecrossdomain.xml needs to be served with content-type text/ [x-]cross-domain-policy .

I read on an earlier thread that the correct content type was once used. Can it be changed back?

Thanks,

- Ivo

<snip> ivo:~ ivopletikosic$ curl -vhttp://photos.googleapis.com/crossdomain.xml ... < HTTP/1.1 200 OK < Content-Type: text/xml < Last-Modified: Tue, 04 Mar 2008 21:38:05 GMT </snip>