private MultipartFormDataStreamProvider GetMultipartProvider() { var temporaryUploadDirectory = HttpContext.Current.Server.MapPath(CorePathsConfig.GetTemporaryEntitiesPath()); Directory.CreateDirectory(temporaryUploadDirectory); return(new MultipartFormDataStreamProvider(temporaryUploadDirectory)); }
private object GetStorePath(NameValueCollection formData) { int entityId = formData.EntityId(); var type = formData.FileType(); var entityPath = HttpContext.Current.Server.MapPath(CorePathsConfig.GetEntityPathForEntityId(type, entityId)); Directory.CreateDirectory(entityPath); return(entityPath); }