Page MenuHomeMusing Studio

Replaceable, single-purpose images
Closed, ResolvedPublic

Description

Overview

Add an optional attribute to images on Snap.as that indicate a particular purpose, or usage slot, for them, e.g. a user avatar or blog favicon. Applications can then upload to this usage slot, and replace any current image, if one exists.

Implementation

Add a new column to the snap_photos database table, e.g. app_use_id, and index it with the owner_id.

On upload, if an app_use_id is given, store this. If there is a conflict, i.e. the owner+useID already exist, then delete the old photo (both file and DB entry) and upload the new one and insert into the DB.

Revisions and Commits

Related Objects

StatusAssignedTask
OpenNone
OpenNone
Resolvedmatt
Resolvedmatt
Resolvedmatt

Event Timeline

matt raised the priority of this task from Normal to High.Jan 4 2022, 2:57 PM
matt created this task.
matt added parent tasks: Restricted Maniphest Task, T546: Custom blog avatar.
matt closed this task as Resolved by committing Restricted Diffusion Commit.Jan 4 2022, 7:47 PM
matt added a commit: Restricted Diffusion Commit.

Implementation came out a little differently: now applications can supply both a key and an id, e.g. avatar and 1, where 1 corresponds to a profile or collection ID. This should make it more usable across our apps, while also supporting Organizations.

Note: these shouldn't show up in the user's Photos.

matt added a commit: Restricted Diffusion Commit.Jan 5 2022, 1:13 PM