diff --git a/src/application/services/file_management_service.rs b/src/application/services/file_management_service.rs index 453a3a9c..70e5b327 100644 --- a/src/application/services/file_management_service.rs +++ b/src/application/services/file_management_service.rs @@ -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) } diff --git a/src/application/services/file_upload_service.rs b/src/application/services/file_upload_service.rs index 9490f7e6..20e18898 100644 --- a/src/application/services/file_upload_service.rs +++ b/src/application/services/file_upload_service.rs @@ -177,7 +177,7 @@ impl FileUploadUseCase for FileUploadService { ); self.maybe_update_storage_usage(&dto); if let Some(hook) = &self.file_lifecycle_hook { - hook.on_file_created(&dto.id, &dto.etag, &dto.mime_type, is_new_blob); + hook.on_file_created(&dto.id, &dto.content_hash, &dto.mime_type, is_new_blob); } Ok(dto) } @@ -260,7 +260,7 @@ impl FileUploadUseCase for FileUploadService { let dto = FileDto::from(file); self.maybe_update_storage_usage(&dto); if let Some(hook) = &self.file_lifecycle_hook { - hook.on_file_created(&dto.id, &dto.etag, &dto.mime_type, is_new_blob); + hook.on_file_created(&dto.id, &dto.content_hash, &dto.mime_type, is_new_blob); } Ok(dto) } @@ -337,7 +337,7 @@ impl FileUploadUseCase for FileUploadService { let updated = file_read.get_file(&file_id).await?; let dto = FileDto::from(updated); if let Some(hook) = &self.file_lifecycle_hook { - hook.on_file_updated(&file_id, &dto.etag, content_type); + hook.on_file_updated(&file_id, &dto.content_hash, content_type); } return Ok(dto); } @@ -375,7 +375,7 @@ impl FileUploadUseCase for FileUploadService { .await?; let dto = FileDto::from(created); if let Some(hook) = &self.file_lifecycle_hook { - hook.on_file_created(&dto.id, &dto.etag, content_type, is_new_blob); + hook.on_file_created(&dto.id, &dto.content_hash, content_type, is_new_blob); } Ok(dto) }