コード例 #1
0
        public static bool Upload(byte[] stream, string name2Save, string folder2Save, int width, int height, long quality)
        {
            var path = HttpContext.Current.Server.MapPath(folder2Save);

            if (!Directory.Exists(path))
            {
                Directory.CreateDirectory(path);
            }
            path = Path.Combine(path, name2Save);
            ResizeImage.ImageResize(stream, path, 90, width, height);
            return(true);
        }