Skip to content

Commit

Permalink
Added ImageEditor comment to clarify image access policy.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Peter Argany authored and facebook-github-bot committed Jul 16, 2018
1 parent ecd8802 commit 10ebcbc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Libraries/Image/ImageEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 10ebcbc

Please sign in to comment.