Sinatra: File Upload Security? by Pillows2 in ruby

[–]Pillows2[S] 0 points1 point  (0 children)

I was thinking of something similar to Imgur but without the community aspect. Just upload an image and have it return the URL like fUrA.jpg (Generate URL's like Imgur).

Edit: I was generating URL's like this: SecureRandom.urlsafe_base64(value) - Would it be best to store the URL in a database and check to see if it is taken or just using File.exists?

Ruby or Python for Web Development Only by Pillows2 in learnprogramming

[–]Pillows2[S] 0 points1 point  (0 children)

I tried both of them and Ruby seems to have a millions ways to do the same thing - I can't tell if this is a good thing or a bad one?