Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • funkwhale funkwhale
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 413
    • Issues 413
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 18
    • Merge requests 18
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Terraform modules
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • funkwhalefunkwhale
  • funkwhalefunkwhale
  • Merge requests
  • !951

Attachments

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Agate requested to merge attachments into develop Nov 12, 2019
  • Overview 3
  • Commits 14
  • Pipelines 8
  • Changes 50

This MR is a rework of the way we handle non-audio files (like user avatar and album covers), to scale better and support more advanced use cases (e.g suggest a new cover for an album, or add banners for artist profiles). This is a hard requirement for #170 (closed) and #588 (closed).

Basically, we now have a dedicated attachment table, which can be referenced whenever we need to associate one or more images to an object. Although currently restricted to images, the table could other type of files if we need it.

Todo:

  • New attachment table
  • API endpoints:
    • Create attachment
    • On the fly fetching of remote attachments
    • Destroy attachment
    • Documentation
  • Use attachment table for album covers (instead of a field on the album table)
    • Update import code to create attachments
    • Expose attachment in the API / federation
    • Data migration to convert existing covers to the new system
  • Manual testing (to ensure we're backward compatible):
    • Subsonic
    • Open Graph / Oembed
    • Remote / federation
    • Performance (n+1 queries, etc.)

Review is recommended commit-by-commit (I've been extra careful to keep a clean history, given the size of the work)

Edited Nov 13, 2019 by Agate
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: attachments