add upload api, image resize using gm/imageMagick
set default blob=mediumblog, text=mediumtext
update attachment api, add test cases, add test jpg and txt files.