Closed coolaj86 closed 13 years ago
Hi coolaj86, sha1name is the filename SHA1 hash !
two different user never causes a filename collisions! The directories are different!
If you upload, for example, two files with the same name, through the same POST, the second file are renamed wth a different sha1name (with a random seed).
If you upload a file with DIfferent POSTs:
I have written about it in the 'File Uploads' section in the Readme!
ops, yes sha1name is unique!
I have added comments to Readme for sha1name . ;)
'I would prefer a UUID or a sha1sum which includes some random element.'
Agreed..
'getSessionID' function cannot fit for all siturations. For example, some users upload files much more than others, so I don't want to create an unique ID Directory but some random dirs.
But the filename is created by SHA1 hash. When then upload files with the same name, collisions occurs..
To give user a chance to use UUID or random string as filename, maybe formaline could add a config method?
I'm confused as to what sha1name means.
It isn't the sha1sum of the file, correct?
Is it the sha1sum of t he name of the file?
That doesn't seem very safe. If I upload a file called
me.jpeg
and someone else uploads a file calledme.jpeg
, what would prevent collision?Or let's say I have a backup service and a client is uploading two files of the same name in one request? Will the sha1sums be different?
I would prefer a UUID or a sha1sum which includes some random element.
Or is each sha1name unique and I'm misunderstanding the documentation?