fix(lifecycle): pass blob content_hash to file lifecycle hooks, not etag
The five FileLifecycleHook call sites handed dto.etag (format
"{blob_hash[..16]}-{modified_at}") to the blob_hash parameter. Blob
lookups keyed by that value can never resolve, so background thumbnail
generation and audio metadata extraction silently failed on every
upload/copy/update, pushing all thumbnail work onto the request path.
Pass dto.content_hash — the raw full BLAKE3 hash already carried by
FileDto — instead.
https://claude.ai/code/session_01QxwJDHqQhbMkHK333QtMme
This commit is contained in:
@@ -151,7 +151,7 @@ impl FileManagementService {
|
||||
|
||||
let dto = FileDto::from(copied_file);
|
||||
if let Some(hook) = &self.file_lifecycle_hook {
|
||||
hook.on_file_copied(&dto.id, &dto.etag, &dto.mime_type, file_id);
|
||||
hook.on_file_copied(&dto.id, &dto.content_hash, &dto.mime_type, file_id);
|
||||
}
|
||||
Ok(dto)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user