mirror of
https://github.com/streetwriters/notesnook-sync-server.git
synced 2026-02-12 11:12:44 +00:00
s3: fix uploads for legacy users
This commit is contained in:
@@ -56,7 +56,11 @@ namespace Notesnook.API.Controllers
|
||||
|
||||
var fileSize = HttpContext.Request.ContentLength ?? 0;
|
||||
bool hasBody = fileSize > 0;
|
||||
if (!hasBody) return Ok(Request.GetEncodedUrl());
|
||||
|
||||
if (!hasBody)
|
||||
{
|
||||
return Ok(Request.GetEncodedUrl() + "&access_token=" + Request.Headers.Authorization.ToString().Replace("Bearer ", ""));
|
||||
}
|
||||
|
||||
if (Constants.IS_SELF_HOSTED) await UploadFileAsync(userId, name, fileSize);
|
||||
else await UploadFileWithChecksAsync(userId, name, fileSize);
|
||||
|
||||
Reference in New Issue
Block a user