Search code examples
randomfilenamesplupload

Algorithm used by pluploadQueue to "randomize" names


Does anybody know, what algorithm Plupload widget uses, when pluploadQueue.rename = TRUE?

I've sent 77 test files and all of them have file name starting with o_18pm0noe (first ten characters equal). Only rest of the file name differs.

I wonder, why such pattern is used and can we somehow control it to have entire file name randmized (in any "natural" way, that is -- not by changing Plupload source code)?


Solution

  • Does anybody know, what algorithm Plupload widget uses, when pluploadQueue.rename = TRUE?

    According to the sources, it is a combination of current time and some random numbers (both base32).

    Can we somehow control it to have entire file name randmized (in any "natural" way, that is -- not by changing Plupload source code)?

    Maybe you can try to set the file name to a custom randomized name? See _enableRenaming for an example of file renaming (file.name = nameInput.val() + ext;).