Closed roundrobin closed 10 years ago
I think I found it, this is where you set it right now, correct? https://github.com/cinely/mule-uploader/blob/master/mule-uploader.js#L196
I have to actually think about it, if it makes sense to use the original file name. Did you ever had filename collisions with your random file name approach? Wouldn't it be better to generate a random name based on a unix timestamp+a random nr?
Sorry for the (SO!) late reply. The thing is, I found it easier to use random keys because I don't have to worry about things like proper escaping, and I do set the Content-Disposition header, so when someone downloads the file, it gets downloaded under the original filename. It's just the URL that looks different.
The keys are assigned in the backend, e.g. https://github.com/cinely/mule-uploader/blob/master/example_backend.py#L100
You can just change that line to whatever you want -- including filename
.
Can you please elaborate a bit more here.
thanks for the good library, its a great start for one of my projects. I was wondering why uploaded files on S3 have a random name (some number) instead of the original file name.
Is there a way to change that?