From 8f596672d3c40aeb4b44c4c8249995f8a171519c Mon Sep 17 00:00:00 2001 From: Pavan kumar Date: Thu, 9 Jun 2016 14:33:57 +0530 Subject: [PATCH] Added microtime for more unique ness --- src/flow.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/flow.js b/src/flow.js index 3f0c1206..0aca050f 100644 --- a/src/flow.js +++ b/src/flow.js @@ -283,6 +283,10 @@ if (typeof custom === 'function') { return custom(file); } + //To avoid same filenames that means `myfile.jpg` and `myfile().jpg` + if (!file.hasOwnProperty('micro_time')) { + file.micro_time = Date.now(); + } // Some confusion in different versions of Firefox var relativePath = file.relativePath || file.webkitRelativePath || file.fileName || file.name; return file.size + '-' + relativePath.replace(/[^0-9a-zA-Z_-]/img, '');