mirror of
https://github.com/greenshot/greenshot
synced 2025-08-21 14:03:23 -07:00
Added "Headers" support to a OAuth request, thus enabling the Picasa-Web plug-in to upload with a filename.
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2232 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
8191c84c0e
commit
7710db665c
2 changed files with 45 additions and 8 deletions
|
@ -18,6 +18,7 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Xml;
|
||||
using Greenshot.IniFile;
|
||||
|
@ -64,7 +65,9 @@ namespace GreenshotPicasaPlugin {
|
|||
IniConfig.Save();
|
||||
}
|
||||
try {
|
||||
string response = oAuth.MakeOAuthRequest(HTTPMethod.POST, "https://picasaweb.google.com/data/feed/api/user/default/albumid/default", null, null, new ImageContainer(imageToUpload, outputSettings, filename));
|
||||
IDictionary<string, string> headers = new Dictionary<string, string>();
|
||||
headers.Add("slug", OAuthSession.UrlEncode3986(filename));
|
||||
string response = oAuth.MakeOAuthRequest(HTTPMethod.POST, "https://picasaweb.google.com/data/feed/api/user/default/albumid/default", headers, null, null, new ImageContainer(imageToUpload, outputSettings, filename));
|
||||
return ParseResponse(response);
|
||||
} catch (Exception ex) {
|
||||
LOG.Error("Upload error: ", ex);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue