mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-01 17:56:51 +13:00
Don't assume wrong access credentials
This commit is contained in:
parent
8ef9657858
commit
fb63dfcecb
1 changed files with 1 additions and 7 deletions
|
@ -166,13 +166,7 @@ public override UploadResult Upload(Stream stream, string fileName)
|
||||||
|
|
||||||
NameValueCollection responseHeaders = SendRequestGetHeaders(HttpMethod.PUT, url, stream, contentType, null, headers);
|
NameValueCollection responseHeaders = SendRequestGetHeaders(HttpMethod.PUT, url, stream, contentType, null, headers);
|
||||||
|
|
||||||
if (responseHeaders == null || responseHeaders.Count == 0)
|
if (responseHeaders == null || responseHeaders.Count == 0 || responseHeaders["ETag"] == null)
|
||||||
{
|
|
||||||
Errors.Add("Upload to Amazon S3 failed. Check your access credentials.");
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (responseHeaders["ETag"] == null)
|
|
||||||
{
|
{
|
||||||
Errors.Add("Upload to Amazon S3 failed.");
|
Errors.Add("Upload to Amazon S3 failed.");
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Reference in a new issue