Thumbnail upload PUT sends the signed Content-MD5 (closes #238) #249

Merged
clawbot merged 1 commits from issue-238-put-content-md5 into next 2026-11-11 22:59:10 +01:00
Collaborator

Closes #238

/files/upload-url signs the content MD5 into the presigned URL, so storage refused every thumbnail PUT that lacked a Content-MD5 header. ApiClient.putFile now takes a third argument, the base64 MD5 given to getUploadURL, and sends it as Content-MD5; fixMissingThumbnails passes it.

Tests: the fake storage in test/thumbnails/thumbnails.test.ts records the MD5 sent to /files/upload-url and answers 400 to a PUT whose Content-MD5 differs, so the fixMissingThumbnails tests fail without the header. test/api/upload.test.ts asserts the header.

Deviation: the issue names test/ente-server.ts for the refusing fake, but that fake serves no uploads; the upload fake lives in the thumbnail test, so the check went there.

Not checked against live storage; the fix follows the request the issue showed returning 200.

Model: opus-5-5

Closes https://git.eeqj.de/sneak/quak/issues/238 `/files/upload-url` signs the content MD5 into the presigned URL, so storage refused every thumbnail PUT that lacked a `Content-MD5` header. `ApiClient.putFile` now takes a third argument, the base64 MD5 given to `getUploadURL`, and sends it as `Content-MD5`; `fixMissingThumbnails` passes it. Tests: the fake storage in `test/thumbnails/thumbnails.test.ts` records the MD5 sent to `/files/upload-url` and answers 400 to a PUT whose `Content-MD5` differs, so the `fixMissingThumbnails` tests fail without the header. `test/api/upload.test.ts` asserts the header. Deviation: the issue names `test/ente-server.ts` for the refusing fake, but that fake serves no uploads; the upload fake lives in the thumbnail test, so the check went there. Not checked against live storage; the fix follows the request the issue showed returning 200. Model: opus-5-5
clawbot added the needs-review label 2026-11-11 21:35:15 +01:00
clawbot self-assigned this 2026-11-11 21:35:15 +01:00
clawbot added 1 commit 2026-11-11 21:35:15 +01:00
`/files/upload-url` signs the content MD5 into the presigned URL, so
storage refused the PUT that `putFile` sent without it. `putFile` now
takes the MD5 given to `getUploadURL` and sends it. The thumbnail test's
fake storage refuses a PUT without the signed header.

Model: opus-5-5
Author
Collaborator

Verdict: PASS
Head: e185299860

The thumbnail upload now sends the MD5 that was signed into the upload URL, and the tests fail when that header is missing.

  • Judgement call: the fake storage that refuses the PUT is in test/thumbnails/thumbnails.test.ts, not test/ente-server.ts as the issue asked, because test/ente-server.ts serves no uploads.
  • Not verified: an upload to real storage. The issue shows the same request returning 200.

Model: opus-5-5

Verdict: PASS Head: e185299860cb26c3304d6b87d47bd3fb6c871d41 The thumbnail upload now sends the MD5 that was signed into the upload URL, and the tests fail when that header is missing. - Judgement call: the fake storage that refuses the PUT is in `test/thumbnails/thumbnails.test.ts`, not `test/ente-server.ts` as the issue asked, because `test/ente-server.ts` serves no uploads. - Not verified: an upload to real storage. The issue shows the same request returning 200. Model: opus-5-5
clawbot merged commit 1bf18baf00 into next 2026-11-11 22:59:10 +01:00
Sign in to join this conversation.