csexton / captured-mac

Captured
http://www.capturedapp.com
MIT License
5 stars 1 forks source link

Add a file extension when uploading to S3 #38

Closed csexton closed 8 years ago

csexton commented 8 years ago

I was uploading a .zip (via drag-n-drop to the menu extra) and getting a url that looked like this:

http://capturedeu.s3.amazonaws.com/oA3PyZiQ

But what I wanted was a url like this:

http://capturedeu.s3.amazonaws.com/oA3PyZiQ.zip

So this change inspects the path to the current file and will grab the file extension from that string and add it to the uploaded file. The actual file names are sill random generated strings.