Pages

Friday, May 24, 2013

how to store user uploaded files in a web app

Generally for simple apps you can use a hash as the file name and link the file using a database. Another approach would be to keep the file in the database. But that would mean the database would fill up quite quickly and it'll cause high usage of db as well. Then again another simple approach is to transfer it to a hosting service and then provide the URL in order to retrieve it. However there are things that needs to be addressed like the file size, number of files, load etc... Therefore the best way is to make sure that the method you implement, suits your requirements. I came across this nice article on how facebook provide the infrastructure to store photos. This provide some insight into how large scale services are organized in order to provide the fascility.

No comments:

Post a Comment