Homec4science

Consolidate handling of special properties for newly uploaded files

Authored by epriestley <git@epriestley.com> on Aug 11 2014, 18:39.

Description

Consolidate handling of special properties for newly uploaded files

Summary:
Fixes T5849. When a new file is created, we might have to actually write the data to a storage engine, or we might be able to just point at data which is already there.

Currently, these two paths handle $params with different code and mild behavioral differences. Instead, have them call the same code so they get the same behavior.

Test Plan:

  • Uploaded the same file multiple times to home page.
  • Uploaded the same file multiple times as profile picture.
  • Generated files via Diffusion.
  • All the files got the expected properties, whether they were reusing data or not.

Reviewers: btrahan, 20after4

Reviewed By: 20after4

Subscribers: epriestley

Maniphest Tasks: T5849

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

Details

Committed
epriestley <git@epriestley.com>Aug 11 2014, 18:39
Pushed
aubortJan 31 2017, 17:16
Parents
rPHa9f2c07345d0: Generate a 403 page with a nice dialog when a file token is invalid
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHeb9dcd6fbaf5: Consolidate handling of special properties for newly uploaded files (authored by epriestley <git@epriestley.com>).Aug 11 2014, 18:39