After spending several hours researching how to upload MIDI data (stored as a blob) so that it can be saved into my Google Cloud Storage (GCS) backend, I realized that processing uploads is far less facile than I initially conceived. This post details two takeaways about file uploading that I learned from developing my most recent product. It is geared towards beginning JavaScript and Rails developers who are familiar with how to process uploads in Rails (such as through Active Storage/CarrierWave/Paperclip) but less familiar with how to process them in the frontend using vanilla JS.
Looking for a quick and easy way to allow users to upload a file in your Rails app? Among the most popular solutions are Active Storage and the Paperclip and CarrierWave gems. But which is best?
You’ve created your database, the models + any associations, and the controllers for your project. Your HTML and CSS is OK. But your app works! After hours, maybe days, of debugging, you have a project you’re proud of. Well, sort of… after all, your app still looks like a form from 10 years ago (maybe worse).