Skip to content

Commit d832de7

Browse files
author
Phan Thanh Cong
committed
change upload endpoint to not require user id
1 parent b5b4855 commit d832de7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Plugins/Picasanew.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ class ChipVN_ImageUploader_Plugins_Picasanew extends ChipVN_ImageUploader_Plugin
1212
const OAUTH_TOKEN_ENDPOINT = 'https://www.googleapis.com/oauth2/v3/token';
1313
const OAUTH_SCOPE_PICASA = 'https://picasaweb.google.com/data/';
1414

15-
const USER_FEED_ENDPOINT = 'https://picasaweb.google.com/data/feed/api/user/%s';
16-
const ALBUM_FEED_ENPOINT = 'https://picasaweb.google.com/data/feed/api/user/%s/albumid/%s';
15+
const USER_FEED_ENDPOINT = 'https://picasaweb.google.com/data/feed/api/user/default';
16+
const ALBUM_FEED_ENPOINT = 'https://picasaweb.google.com/data/feed/api/user/default/albumid/%s';
1717

1818
const OAUTH_TOKEN = 'oauth_token';
1919
const OAUTH_TOKEN_EXPIRES_AT = '__expires_at';
@@ -268,7 +268,7 @@ protected function doLogin()
268268
protected function doUpload()
269269
{
270270
$this->checkValidToken(__METHOD__);
271-
$endpoint = sprintf(self::ALBUM_FEED_ENPOINT, $this->username, $this->albumId).'?alt=json';
271+
$endpoint = sprintf(self::ALBUM_FEED_ENPOINT, $this->albumId).'?alt=json';
272272

273273
$this->resetHttpClient()
274274
->setHeaders($this->getGeneralHeaders())

0 commit comments

Comments
 (0)