asp.net - Converting querystring to filename - best practise? -
i have handler (c#/asp.net) pulls images database. current format looks foo.com/_image.ashx?querystring1&querystring2
querystring keys things id, width, zoom level etc.
i can either munge filename (i.e. foo.com/id__999_w__128__h__200.jpg
), or whole url structure (i.e. foo.com/id/999/w/128/h/200/image.jpg
).
im interested see other people given situation, there dont seem articles or discussions of practice on net.
the easiest solution base64 filename, can pretty guarantee filename correct each time, , not tampered or broken.
string filename = @"c:\images\myimage.png"; // may need change encoding type here string converted = convert.tobase64string( system.text.encoding.default.getbytes(filename));
Comments
Post a Comment