hzrd149 / blossom-server

Blobs stored simply on mediaservers
MIT License
16 stars 5 forks source link

upload broken on 4.1.0 #3

Closed henrixd7 closed 2 weeks ago

henrixd7 commented 2 weeks ago

It seems that ctx.request.body is empty. I can confirm that the data comes through the nginx's reverse proxy by listening the port with netcat.

I believe this is what triggers the error for me: if (ctx.request.body) { upload = await uploadWriteStream(ctx.req); mimeType = contentType || upload.type; } else throw new Error("Invalid upload");

blossom-server:rules Looking for match image/png 336ccc3bac7ab8ea4d48e60fabd66bb8f258da997107a1a33585856a8158b6f8 +0ms blossom-server:rules Found rule for 1 week +0ms Error: Invalid upload

Browser gets 500 error "Something went wrong".

When I tried 4.0.1 version, it works without problems.

hzrd149 commented 2 weeks ago

Fixed in v4.1.1 The issue was it was expecting ctx.request.body to be defined. when it should have just been using ctx.req to get the incoming stream