mirror of
https://github.com/suitenumerique/docs.git
synced 2026-09-27 20:15:01 +02:00
♻️(yhub) replace minio client by S3 sdk
We have some signature errors when using the minio client to list all the versions of an existing document. To avoid this error we have decided to use the S3 sdk and allow to configure the signature versino the user wants. Also, the check on the document size has been removed, there is no limitation on the document size.
This commit is contained in:
@@ -16,7 +16,6 @@ import {
|
||||
jwtVerify,
|
||||
SignJWT,
|
||||
} from 'jose';
|
||||
import { Client as S3Client } from 'minio';
|
||||
|
||||
import { secret } from './env.js';
|
||||
// legacy Django/S3 document store — see migration.js and README.md
|
||||
@@ -237,11 +236,11 @@ const backendFetch = async (path, { cookie, origin }) => {
|
||||
// Seeding never decides whether the caller may read the document — that is the
|
||||
// backend's answer alone. There are two ways this ends other than a seed:
|
||||
//
|
||||
// the legacy object cannot be migrated (it does not decode, or it is bigger
|
||||
// than we will load) — retrying will not change that, so the room opens as
|
||||
// a new document. Refusing instead would lock a document nobody can repair
|
||||
// from the outside. Logged per access, because the caller is now editing
|
||||
// alongside legacy content that stayed behind in S3.
|
||||
// the legacy object cannot be migrated (it does not decode) — retrying will
|
||||
// not change that, so the room opens as a new document. Refusing instead
|
||||
// would lock a document nobody can repair from the outside. Logged per
|
||||
// access, because the caller is now editing alongside legacy content that
|
||||
// stayed behind in S3.
|
||||
// the legacy store could not be reached (timeout, network, backpressure) —
|
||||
// the same request later may well succeed, so it answers 503 rather than
|
||||
// silently starting an empty document on top of content that exists.
|
||||
|
||||
Reference in New Issue
Block a user