Esempio n. 1
0
        private MultipartFormDataStreamProvider GetMultipartProvider()
        {
            var temporaryUploadDirectory = HttpContext.Current.Server.MapPath(CorePathsConfig.GetTemporaryEntitiesPath());

            Directory.CreateDirectory(temporaryUploadDirectory);

            return(new MultipartFormDataStreamProvider(temporaryUploadDirectory));
        }
Esempio n. 2
0
        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);
        }