Best format to send image from javascript client to SQL server -
i making application store azure sql server db user information, including profile photo downloaded facebook. on server side, asp.net mvc4'll have controller receive information , send database.
the client side javascript , thought give image in json (once converted base64). option? better directly send jpg? advantages of sending information in json?
in sql server image field stored nvarchar (max)
are going return image binary stream content type image/jpeg or text stream encoded base64? far more you're going former, there little reason go through intermediate base64 encoded transfer. , of course, store them varbinary(max). if choose store them base64, choosing unicode data type base64 text wasteful, (double storage cost no reason...), base64 can fit in varchar(max).
but, specially in sql azure environemnt, should consider storing media in azure blob storage , store blob path in database.
Comments
Post a Comment