Page MenuHomeMusing Studio

Support uploading image in WYSIWYG editor
Closed, ResolvedPublic

Description

Overview

Allow users to upload photos directly from the Classic / WYSIWYG editor.

Background

Users should see the standard image uploading experience they expect in our WYSIWYG editor.

Implementation

Prerequisites

On Write.as Web:

  • Create an API endpoint that handles uploads, using the Snap.as upload handler

On WriteFreely:

Design

Add a file input to the Classic / WYSIWYG editor. When a user selects a file, start uploading it, and insert a placeholder into the editor. Once the upload is complete, automatically replace the placeholder with the image, using the final image URL.

Revisions and Commits

Event Timeline

matt triaged this task as High priority.Apr 15 2021, 8:23 PM
matt created this task.
matt added a subtask: T550: Image uploading.
matt mentioned this in T550: Image uploading.
matt removed a subtask: T550: Image uploading.
matt added a parent task: T550: Image uploading.

Currently, this only uploads to a user's personal Snap.as storage space -- which likely isn't the desired behavior for users writing a post on a team / Organizations blog.

Possible workaround: Upload to personal or team space, based on selected publish target. But this is brittle and means trouble for users e.g. publishing Draft posts destined for a team blog. Instead, we should probably allow team members to switch app context to their team (T850), like we do on Snap.as. Then, when composing or editing a post, uploaded photos will go to the team instead of the personal Snap.as space.

matt added a commit: Restricted Diffusion Commit.Apr 15 2021, 9:01 PM
matt added a commit: Restricted Diffusion Commit.

This is live on Write.as now (Classic editor v2)

matt added a subtask: Restricted Maniphest Task.Apr 16 2021, 2:15 PM

One issue: images aren't automatically resized, as they are when uploaded through Snap.as. Instead of doing client-side image resizing here, we should rely on the server: {T851}.

matt removed a subtask: Restricted Maniphest Task.Apr 16 2021, 7:23 PM
matt added a commit: Restricted Diffusion Commit.Apr 16 2021, 8:33 PM
matt removed a parent task: T550: Image uploading.
matt removed a project: WriteFreely.

Does it mean that hosted WriteFreely will need to wait for SnapFreely to be available and won't have image upload functionality integrated into WriteFreely itself?