waynehoover / s3_direct_upload

Direct Upload to Amazon S3 With CORS
MIT License
652 stars 333 forks source link

where does the unique_id comes from #218

Open chrisyeung1121 opened 9 years ago

chrisyeung1121 commented 9 years ago

just wondering..

designstuhl commented 5 years ago

I was wondering this too. If you open up the s3_direct_uploads.js.coffee file in the gem, from what I can tell, it gets set inside of the setUploadForm function on line 41

file.unique_id = Math.random().toString(36).substr(2,16)