Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GO-4017 Set imageKind on file upload #1596

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

KirillSto
Copy link
Member

@KirillSto KirillSto commented Sep 19, 2024

https://linear.app/anytype/issue/GO-4017/clipboard-html-files-should-be-hidden-by-default

  • AutomaticallyCreated image kind is introduced in model protocol
  • AutomaticallyCreated is set to all images being uploaded on bookmark creation, paste from html and webclipper
  • ImageKind field is added to UnspashDownload, FileUpload and BlockFileCreateAndUpload RPCs
  • UploadBlockFile, UploadBlockFileSync and UploadFileBlock methods of block.Service are united into UploadBlockFile
  • MarkIsArchived and BlockDataviewRelationListAvailable are removed as they are not used

@KirillSto KirillSto self-assigned this Sep 19, 2024
@KirillSto KirillSto changed the title GO-4017 Set imageKind GO-4017 Set imageKind on file upload Sep 19, 2024
Copy link

github-actions bot commented Sep 19, 2024

New Coverage 47.9% of statements
Patch Coverage 51.4% of changed statements (36/70)

Coverage provided by https://github.com/seriousben/go-patch-cover-action

)

type BlockService interface {
GetObject(ctx context.Context, objectID string) (sb smartblock.SmartBlock, err error)
GetObjectByFullID(ctx context.Context, id domain.FullID) (sb smartblock.SmartBlock, err error)
UploadFile(ctx context.Context, spaceId string, req block.FileUploadRequest) (objectId string, details *types.Struct, err error)
UploadFileBlock(contextID string, req block.UploadRequest) (fileObjectId string, err error)
UploadBlockFile(ctx session.Context, req block.UploadRequest, groupID string, isSync bool) (fileObjectId string, err error)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like ctx is always nil, when you call UploadBlockFile. May be we should remove it? 🧐

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I agree with you! Let me fix that

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Basically, I have decided to propagate session.ctx in couple of file uploading commands

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants