![Page 1: If you doing file uploads with rails youre gonna have a bad time](https://reader034.vdocuments.site/reader034/viewer/2022050613/587ea1b71a28ab2a4a8b59f5/html5/thumbnails/1.jpg)
Dave Rauchwerk @[email protected]
![Page 2: If you doing file uploads with rails youre gonna have a bad time](https://reader034.vdocuments.site/reader034/viewer/2022050613/587ea1b71a28ab2a4a8b59f5/html5/thumbnails/2.jpg)
● Moved from Austin in December
● I sometimes enjoy eating canned corn directly from the can
● According to current NASA policy I'm too tall to go space - must be under 6ft to fly
● iOS && backbonejs mobile web apps talking to "RESTFUL" Rails on heroku
![Page 3: If you doing file uploads with rails youre gonna have a bad time](https://reader034.vdocuments.site/reader034/viewer/2022050613/587ea1b71a28ab2a4a8b59f5/html5/thumbnails/3.jpg)
THE FUTURE OF THE INTERNET
![Page 4: If you doing file uploads with rails youre gonna have a bad time](https://reader034.vdocuments.site/reader034/viewer/2022050613/587ea1b71a28ab2a4a8b59f5/html5/thumbnails/4.jpg)
![Page 5: If you doing file uploads with rails youre gonna have a bad time](https://reader034.vdocuments.site/reader034/viewer/2022050613/587ea1b71a28ab2a4a8b59f5/html5/thumbnails/5.jpg)
Keep it lean - MVP
● Upload very high-res pictures of cats (300 dpi)
● Rate Grumpiness
![Page 6: If you doing file uploads with rails youre gonna have a bad time](https://reader034.vdocuments.site/reader034/viewer/2022050613/587ea1b71a28ab2a4a8b59f5/html5/thumbnails/6.jpg)
Awesome Ways to Handle File Uploads
Rails < 4● Paperclip + rmagick + S3 - https://github.
com/thoughtbot/paperclip● Carrierwave + minimagick + S3 - https:
//github.com/Filepicker/filepicker-rails● filepicker_rails + S3Rails 4 - The Future!● Streaming!
![Page 7: If you doing file uploads with rails youre gonna have a bad time](https://reader034.vdocuments.site/reader034/viewer/2022050613/587ea1b71a28ab2a4a8b59f5/html5/thumbnails/7.jpg)
Common Probs
Heroku● files larger than 4mb
cause H11&H12 errors
Other Envs● long running requests
take up workers ● config● imagmagick memory
leaks
![Page 8: If you doing file uploads with rails youre gonna have a bad time](https://reader034.vdocuments.site/reader034/viewer/2022050613/587ea1b71a28ab2a4a8b59f5/html5/thumbnails/8.jpg)
Solutions
● Separate Server for uploads (SOA)
● No Uploads larger 4mb
● Upload directly to S3
![Page 9: If you doing file uploads with rails youre gonna have a bad time](https://reader034.vdocuments.site/reader034/viewer/2022050613/587ea1b71a28ab2a4a8b59f5/html5/thumbnails/9.jpg)
Ideal Architecture
Rails App Streaming Server(uploads)
Amazon S3Rackspace CloudAzure Blobstore
Client mobile || web
Long Short
Long
![Page 10: If you doing file uploads with rails youre gonna have a bad time](https://reader034.vdocuments.site/reader034/viewer/2022050613/587ea1b71a28ab2a4a8b59f5/html5/thumbnails/10.jpg)
![Page 11: If you doing file uploads with rails youre gonna have a bad time](https://reader034.vdocuments.site/reader034/viewer/2022050613/587ea1b71a28ab2a4a8b59f5/html5/thumbnails/11.jpg)