c# - HTML textarea with image upload -
i'm in need of develop website allow user input information , images <textarea> save database. data displayed in page.
i though of using ajax upload file append <img> <textarea>. approach produce sql injection security threat.
so need advice on how achieve still can rid of sql injection.
when user uploads image, following , safe append image html textarea:
- is user upload valid jpg/gif/png/x image? (use image libraries verify that.)
- rename image "safe" crc32 of contents + current time in microseconds file name innocuous.
- put image new name in location can served.
Comments
Post a Comment