memos icon indicating copy to clipboard operation
memos copied to clipboard

unsupported protocol scheme \"\" when uploading to S3

Open abdessalaam opened this issue 2 years ago • 1 comments

Describe the bug

I have configured storage to use Backblaze bucket, S3 compatible, but when trying to upload a file the logs show an error:

"method":"POST","uri":"/api/v1/resource/blob","status":500,"error":"code=500, message=Failed to save resource, internal=Failed to upload via s3 client: operation error S3: PutObject, exceeded maximum number of attempts, 3, https response error StatusCode: 0, RequestID: , HostID: , request send failed, Put \"/s3.path-to-bucket-endpoint?x-id=PutObject\": unsupported protocol scheme \"\""}

Steps to reproduce

  1. Configure S3 storage in settings
  2. Try to create a new note and attach a jpg file

Screenshots or additional context

I am running Memos in docker on Ubuntu server, behind nginx proxy with Let's Encrypt SSL

abdessalaam avatar Aug 19 '23 18:08 abdessalaam

Try to add the URL Scheme (http:// or https://) before the S3 Base URL. This fixed the error for me.

Note: You should NOT Transmit your data over http to S3, because anybody can read your files! (This should only even be possible with custom, self-hosted S3 Servers)

bjesuiter avatar Nov 17 '23 23:11 bjesuiter