Added ImageEditor comment to clarify image access policy.

Summary:
ImageEditor.cropImage creates a temporary file when downloading images https://fburl.com/07r68w9s

This temporary file can be stored on external storage on android. External storage is accessible to any other application on the device, which could possibly leak images.

Using external storage may be unavoidable. I've voiced my opinion and solicited others on T31548988. Once a good policy is agreed upon, we can implement it.

For now, I'm adding this comment to make it explicit how images are cached.

Reviewed By: achen1

Differential Revision: D8837808

fbshipit-source-id: 02341bc94a1c95340390a713b76fe85603fd8f1b
This commit is contained in:
Peter Argany 2018-07-16 13:13:03 -07:00 committed by Facebook Github Bot
parent ecd8802c1f
commit 10ebcbcf45
1 changed files with 3 additions and 1 deletions

View File

@ -50,7 +50,9 @@ class ImageEditor {
/**
* Crop the image specified by the URI param. If URI points to a remote
* image, it will be downloaded automatically. If the image cannot be
* loaded/downloaded, the failure callback will be called.
* loaded/downloaded, the failure callback will be called. On Android, a
* downloaded image may be cached in external storage, a publicly accessible
* location, if it has more available space than internal storage.
*
* If the cropping process is successful, the resultant cropped image
* will be stored in the ImageStore, and the URI returned in the success