linagora / tmail-backend

GNU Affero General Public License v3.0
30 stars 17 forks source link

ISSUE-1048 [PublicAsset] PublicAsset/set create JMAP method #1057

Closed vttranlina closed 1 month ago

vttranlina commented 1 month ago

resolve https://github.com/linagora/tmail-backend/issues/1048

vttranlina commented 1 month ago

It will be reusing the james-project pr JAMES-3544 Add getUploadMetadata method for UploadRepository + add to UploadResolver

Arsnael commented 1 month ago

[ERROR] /home/jenkins/build/workspace/Tmail_build_PR-1057/tmail-backend/jmap/extensions/src/main/scala/com/linagora/tmail/james/jmap/method/PublicAssetSetMethod.scala:134: value getUploadMetadata is not a member of org.apache.james.jmap.routes.UploadResolver

chibenwa commented 1 month ago

It will be reusing the james-project pr https://github.com/apache/james-project/pull/2253

Please don't!

This is uneeded.

https://github.com/linagora/tmail-backend/pull/1057#discussion_r1608243519

As expressed there please rely solely on BlobResolvers @vttranlina

vttranlina commented 1 month ago

As expressed there please rely solely on BlobResolvers

But we want to fetch only metadata, while def resolve(blobId: BlobId, mailboxSession: MailboxSession): SMono[Blob] return bytes data content

vttranlina commented 1 month ago

[ERROR] /home/jenkins/build/workspace/Tmail_build_PR-1057/tmail-backend/jmap/extensions/src/main/scala/com/linagora/tmail/james/jmap/method/PublicAssetSetMethod.scala:134: value getUploadMetadata is not a member of org.apache.james.jmap.routes.UploadResolver

Some code is using code of james-project that was not merged. (commit: https://github.com/linagora/tmail-backend/pull/1057/commits/f165c07a5cfb1daff36a484f68b282bae3c04a55)

chibenwa commented 1 month ago

But we want to fetch only metadata, while def resolve(blobId: BlobId, mailboxSession: MailboxSession): SMono[Blob] return bytes data content

Excuse me we want to copy the content as far as I know....

Because uploads will be cleaned up. Which means underlying blobId will disappear if nothing is done.

vttranlina commented 1 month ago

A lot of changed code, then I will rebase & force push. It will easier

Arsnael commented 1 month ago

Update the spec please ;-)

Initially the spec was good regarding /set create, so please revert that :)

vttranlina commented 1 month ago

The Cassandra repository was merged I will rebase one more time for the Distributed test