chibenwa commented on code in PR #2707: URL: https://github.com/apache/james-project/pull/2707#discussion_r2064830336
########## server/data/data-jmap-cassandra/src/main/java/org/apache/james/jmap/cassandra/upload/CassandraUploadRepository.java: ########## @@ -48,32 +49,36 @@ public class CassandraUploadRepository implements UploadRepository { public static final BucketName UPLOAD_BUCKET = BucketName.of("jmap-uploads"); private final UploadDAO uploadDAO; - private final BlobStore blobStore; + private final BlobId.Factory blobIdFactory; + private final BlobStoreDAO blobStoreDAO; private final Clock clock; @Inject - public CassandraUploadRepository(UploadDAO uploadDAO, BlobStore blobStore, Clock clock) { + public CassandraUploadRepository(UploadDAO uploadDAO, BlobId.Factory blobIdFactory, BlobStoreDAO blobStoreDAO, Clock clock) { this.uploadDAO = uploadDAO; - this.blobStore = blobStore; + this.blobIdFactory = blobIdFactory; + this.blobStoreDAO = blobStoreDAO; this.clock = clock; } @Override public Mono<UploadMetaData> upload(InputStream data, ContentType contentType, Username user) { UploadId uploadId = generateId(); + BlobId blobId = blobIdFactory.of(UUID.randomUUID().toString()); Review Comment: I would rather have the blobid set to the uploadId rather than an unrelated random value as there exist a 1 <-> 1 relationship -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org For additional commands, e-mail: notifications-h...@james.apache.org