Lee Evans pisze:
How are you authenticating the user via the API? OAuth, AuthSub, etc?
Whatever way you are authenticating to send the file, you have to use the same
method to make additional requests.
If you post your function that uploads your image, it might shed some light on
the problem.
Lee
Thanks for reply, i'm authenticating using authsub, and then session_token.
uploading pictures with:
public function addPhoto($albumId, $photo) {
$client = null;
$user = 'default';
try {
$client = $this->getAuthSubHttpClient();
}
catch(Exception $e) {
throw $e;
}
$photos = new Zend_Gdata_Photos($client);
$fd = $photos->newMediaFileSource($photo["file"]);
$fd->setContentType($photo["type"]);
$entry = new Zend_Gdata_Photos_PhotoEntry();
$entry->setMediaSource($fd);
$entry->setTitle($photos->newTitle($photo["name"]));
$albumQuery = new Zend_Gdata_Photos_AlbumQuery;
$albumQuery->setUser($user);
$albumQuery->setAlbumId($albumId);
$albumEntry = $photos->getAlbumEntry($albumQuery);
$result = $photos->insertPhotoEntry($entry, $albumEntry);
if (!$result) {
throw new Exception('There was an issue with the file upload.');
}
}
i think the problem is with curl that i've posted previously, upload
function is working fine without that other curl. My curl function is
not used with picasa, it does sth else ;-)
--
You received this message because you are subscribed to the Google Groups
"Google Picasa Web Albums API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-picasa-data-api?hl=en.