VirtoCommerce.Platform.Data.Asset.FileSystemBlobProvider.Upload C# (CSharp) Method

Upload() public method

public Upload ( VirtoCommerce.Platform.Core.Asset.UploadStreamInfo request ) : string
request VirtoCommerce.Platform.Core.Asset.UploadStreamInfo
return string
        public string Upload(UploadStreamInfo request)
        {
            if (request == null)
                throw new ArgumentNullException("request");

            var folderPath = GetAbsoluteStoragePathFromUrl(request.FolderName);

            if (!Directory.Exists(folderPath))
            {
                Directory.CreateDirectory(folderPath);
            }
            var storageFileName = Path.Combine(folderPath, request.FileName);
            UpdloadFile(request.FileByteStream, storageFileName);

            return Path.Combine(request.FolderName, request.FileName);
        }