diff options
author | Struan Donald <struan@exo.org.uk> | 2013-07-16 12:03:56 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2013-07-16 12:03:56 +0100 |
commit | cde2222efa4963d9f8458b7dba7b09e3b6b68046 (patch) | |
tree | 5df1392ce3a34519a224ac872d22484697119d2a /src/js/views | |
parent | 54a2ef1075b50fc8759c2179e044ed06f8a88047 (diff) |
use a unique name for each photo added to a report in order to get round
what seem to be iOS caching issues on the photo screen if you add,
remove and then add a photo. Previously it would display the original
photo rather than the new one.
Diffstat (limited to 'src/js/views')
-rw-r--r-- | src/js/views/photo.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/js/views/photo.js b/src/js/views/photo.js index 0c308a8..6a2b8f6 100644 --- a/src/js/views/photo.js +++ b/src/js/views/photo.js @@ -48,10 +48,11 @@ // images where they are stored on the filesystem so if you move, and then delete // them, you are moving and deleting the only copy of them which is likely to be // surprising and unwelcome so we copy them instead. + var fileName = CONFIG.NAMESPACE + '_' + this.model.cid + '_' + moment().unix() + '.jpg'; if ( FMS.isAndroid ) { - move = FMS.files.copyURI( imgURI ); + move = FMS.files.copyURI( imgURI, fileName ); } else { - move = FMS.files.moveURI( imgURI ); + move = FMS.files.moveURI( imgURI, fileName ); } var that = this; |