Lot 3 (1/4) : racine S3, backend du Store (catalogue + objets minio-go)

Arborescence dans s3_nodes, contenus sous des clés o/<id> figées au dépôt,
corbeille dans s3_trash, configuration admin dans s3_config. Délégations
S3 dans List/Stat/Open/Put/Mkdir/Move/Copy/Delete/Walk/corbeille,
miniatures, partages, tags, recherche (noms et tags). Pas d'historique.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LNfwm4pfYR9C914C2EeiuB
This commit is contained in:
claude BotandClaude Opus 5.5 committed 2026-11-20 18:01:01 +01:00
1 parent 235916157a
commit 7c1f49cb5c
13 files changed
+379 -29

No files matched your search

+9 -13
View File
@@ -53,15 +53,11 @@ func (s *Store) thumbAbs(c string, isDir bool) string {
// type MIME et sa date. ErrNotFound si le fichier n'est pas une image
// décodable.
func (s *Store) Thumb(rel string) ([]byte, string, time.Time, error) {
c, abs, err := s.resolve(rel)
c, src, err := s.lstat(rel)
if err != nil {
return nil, "", time.Time{}, err
}
if c == "" || !isDecodableImage(c) {
return nil, "", time.Time{}, ErrNotFound
}
src, err := os.Lstat(abs)
if err != nil || !src.Mode().IsRegular() {
if c == "" || !isDecodableImage(c) || !src.Mode().IsRegular() {
return nil, "", time.Time{}, ErrNotFound
}
ta := s.thumbAbs(c, false)
@@ -75,7 +71,12 @@ func (s *Store) Thumb(rel string) ([]byte, string, time.Time, error) {
}
s.thumbSem <- struct{}{}
defer func() { <-s.thumbSem }()
b, err := makeThumb(abs)
f, _, err := s.Open(c)
if err != nil {
return nil, "", time.Time{}, ErrNotFound
}
b, err := makeThumb(f)
f.Close()
if err != nil {
return nil, "", time.Time{}, ErrNotFound
}
@@ -92,12 +93,7 @@ func sniffThumb(b []byte) string {
return "image/jpeg"
}
func makeThumb(abs string) ([]byte, error) {
f, err := os.Open(abs)
if err != nil {
return nil, err
}
defer f.Close()
func makeThumb(f io.ReadSeeker) ([]byte, error) {
cfg, format, err := image.DecodeConfig(f)
if err != nil {
return nil, err