What is the best way to save/load img/file(word,excel etc.) in php/asp.net application? -


i'm student , aspire become great web developer :)

i want work on 'practice' projects capable of storing/retrieving images or type of file(.doc,.xcl,.txt, etc.). saying it's better store img/any file in file system opposed saving inside database.

i know pros , cons of both side.

i know what's best data type storing imgs/files in mysql (i'm using longblob php-mysql)for saving imgs

i know what's best data type storing imgs/files in sql server (i'm using asp.net varbinary(max) sql server 2008)for saving imgs

lastly,i'm curious on how websites facebook , other big web applications store imgs , files.

sir/ma'am, answers of great , appreciated. thank you++

pros: storing in database

  • files saved "forever"

  • can restrict access real file more easily

  • you can, technically, check duplicate files.

  • you not keeping files on drive, can faster access server

  • less files on server considered "better" , more organized

  • "one file everything"

cons:

  • if site database not, file invalid (through "direct" linking)

  • some databases cannot reconfigured allow blobs of size limit (a few mb), therefore making large images cannot stored (but can separated)

  • more data becomes stored in memory when loading file (to variable); similar problem above, large images can slow down server.

  • some files may of different character encoding, , storing and/or retrieving files may corrupt original file. not sure if real problem, think was.

i suggest not store files on database anymore because of cons.


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -