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

[stable27] Refactor attachment loading #5087

Merged
merged 26 commits into from
Dec 6, 2023
Merged

Commits on Dec 5, 2023

  1. refactor(AttachmentService): Some code style cleanup

    Signed-off-by: Jonas <[email protected]>
    mejo- committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    a437b83 View commit details
    Browse the repository at this point in the history
  2. chore(attachments): Remove support for obsolete text:// format

    This format was only used from 03.01.2022 to 23.05.2022.
    
    Signed-off-by: Jonas <[email protected]>
    mejo- committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    d331a36 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0aa69d7 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a282b70 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    29c79f8 View commit details
    Browse the repository at this point in the history
  6. fix(attachment): Remove candidate logic from ImageView node

    `AttachmentResolver` only returns one candidate now.
    
    Signed-off-by: Jonas <[email protected]>
    mejo- committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    a3ecdb1 View commit details
    Browse the repository at this point in the history
  7. fix(attachments): Fix some issues with the showimage modal

    * Only open images from native attachments list
    * Only open images, non-image attachments are not supported anyway
    * Fix watcher for `startIndex`
    * Don't set computed property `currentImage`
    * Show error if image cannot be found in attachments
    
    Signed-off-by: Jonas <[email protected]>
    mejo- committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    af29e57 View commit details
    Browse the repository at this point in the history
  8. chore(attachments): Remove obsolete code

    * `getMetadata()` from AttachmentResolver class.
    * `isSupportedImage` logic from ImageView node. Was never used.
    * `hasPreview=true` logic from AttachmentResolver class.
    
    Signed-off-by: Jonas <[email protected]>
    mejo- committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    a6fcc87 View commit details
    Browse the repository at this point in the history
  9. feat(editor): Allow to pass fileId to MarkdownContentEditor

    Required for AttachmentResolver to fetch list of attachments for
    the document.
    
    Signed-off-by: Jonas <[email protected]>
    mejo- committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    95ef57d View commit details
    Browse the repository at this point in the history
  10. feat(attachments): Allow to get attachments without document session

    For all read-only attachments API endpoints, add support to authorize
    with user session or share token when no document session is available.
    
    Allows to get the attachments list and attachment files from
    MarkdownContentEditor.vue without a document session.
    
    Signed-off-by: Jonas <[email protected]>
    mejo- committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    969b85c View commit details
    Browse the repository at this point in the history
  11. chore(attachments): Remove special-handling for preview URLs

    We don't remember a legitimate reason why they would end up in a text
    document. Probably something that predate the attachments directory
    era.
    
    Signed-off-by: Jonas <[email protected]>
    mejo- committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    4441e7a View commit details
    Browse the repository at this point in the history
  12. fix(attachments): Open non-image attachments in viewer or download

    When viewer is available, not in use and supports the mimetype, and
    we're not in a public share, open the attachment in viewer. Otherwise,
    download the attachment.
    
    Fixes: #3849
    Fixes: #4723
    Fixes: #5030
    
    Signed-off-by: Jonas <[email protected]>
    mejo- committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    3703ea1 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    c2a7fea View commit details
    Browse the repository at this point in the history
  14. chore(composer): Update autoloader maps

    Signed-off-by: Jonas <[email protected]>
    mejo- committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    95c6734 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    e2b2c16 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    463b55f View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    cd51248 View commit details
    Browse the repository at this point in the history
  18. fix(attachments): use getRelativePath from userFolder for davPath

    Also don't set any davPath at all in public share. We probably don't
    have DAV access there anyway.
    
    Signed-off-by: Jonas <[email protected]>
    mejo- committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    d135f9d View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    112e399 View commit details
    Browse the repository at this point in the history
  20. fix(attachments): Show all loaded images in ShowImageModal

    Instead of just opening native image attachments, query the HTML
    document to get all loaded attachments (regardless whether native, via
    direct URL or via DAV) and list them.
    
    Signed-off-by: Jonas <[email protected]>
    mejo- committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    cf30cde View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    99ac897 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    64b7639 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    a4cafdc View commit details
    Browse the repository at this point in the history
  24. fix(deps): Update to cypress 13

    Required for the file attachment download test to succeed.
    
    Signed-off-by: Jonas <[email protected]>
    mejo- committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    febbd11 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    70b5a89 View commit details
    Browse the repository at this point in the history
  26. chore(assets): Recompile assets

    Signed-off-by: nextcloud-command <[email protected]>
    nextcloud-command committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    8b67f07 View commit details
    Browse the repository at this point in the history