mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 18:57:28 -07:00
Added Multipart/form-data support, this should improve memory usage and upload performance. Is also needed for Flickr.
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2124 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
f464b3a3ca
commit
c983567827
4 changed files with 197 additions and 77 deletions
|
@ -95,7 +95,7 @@ namespace GreenshotPhotobucketPlugin {
|
|||
oAuth.Sign(HTTPMethod.POST, apiUrl, parameters);
|
||||
apiUrl = apiUrl.Replace("api.photobucket.com", config.SubDomain);
|
||||
// Add image
|
||||
parameters.Add("uploadfile", System.Convert.ToBase64String(imageData, 0, dataLength));
|
||||
parameters.Add("uploadfile", new FileParameter(imageData, filename, "image/png", dataLength));
|
||||
responseString = oAuth.MakeRequest(HTTPMethod.POST, apiUrl, parameters, null, null);
|
||||
} catch (Exception ex) {
|
||||
LOG.Error("Error uploading to Photobucket.", ex);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue