HomePhabricator

Only attach files that are both referenced in Remarkup and attached by explicit…

Description

Only attach files that are both referenced in Remarkup and attached by explicit metadata

Summary:
Ref T13682. When a user uploads a file, then changes their mind and deletes the reference to the file, we don't actually want to attach the file.

When choosing which files to attach, only attach files which are both referenced in Remarkup and explicitly attached in remarkup metadata.

Test Plan:

  • Dropped a file into a comment, submitted it, saw it attach normally.
  • Dropped a file into a comment, deleted the reference, submitted it, saw no attachment.

Maniphest Tasks: T13682

Differential Revision: https://secure.phabricator.com/D21832