Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • briar briar
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 789
    • Issues 789
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 9
    • Merge requests 9
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • briarbriar
  • briarbriar
  • Merge requests
  • !1147

Compress images

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged akwizgran requested to merge compress-images into master Jun 25, 2019
  • Overview 13
  • Commits 5
  • Pipelines 4
  • Changes 17

This branch adds temporary code for compressing image attachments to fit within the current 32 KiB message size limit. Once large message support is merged we can remove this code or update it to use more moderate compression, perhaps with a setting to choose whether to send compressed or uncompressed attachments.

The first commit, which contains most of the changes, is refactoring to extract the code that finds the size of an image from an InputStream, which the second commit uses when creating attachments as well as when loading them. Interfaces were extracted from the AttachmentRetriever and AttachmentCreator classes to allow ConversationViewModel to inject them. We can keep most of these changes even if we remove compression later.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: compress-images