예제 #1
0
        public ActionResult UploadImages()
        {
            List <String> fileNames = new List <string>();

            foreach (var keyItem in Request.Form.Keys)
            {
                var key = keyItem.ToString();
                if (key.StartsWith("upload_file"))
                {
                    var base64 = Request.Form[key];
                    SaveBase64Image(base64, (stream, file) => {
                        var fid = FileId.FromFileName(file);
                        _FileStore.CreateTemp(fid, stream);
                        fileNames.Add(fid.ToTempId());
                    });
                }
            }
            return(SuccessJsonResult <List <String> >(fileNames));
        }
예제 #2
0
 public void CreateTemp(FileId id, Stream stream)
 {
     ExceptionHelper.ThrowIfNull(id, "id");
     ExceptionHelper.ThrowIfNull(stream, "stream");
     _FileStore.CreateTemp(id, stream);
 }