public RemoteFileListEntryStream( IJSRuntime jsRuntime, ElementReference inputFileElement, FileListEntryImpl file, FileUploadService fileUploadService, IUrlHelper urlHelper ) : base(jsRuntime, inputFileElement, file) { _fileUploadHandler = fileUploadService.RegisterFileUploadHandler( GetHandlerId(), RemoteStreamReceivedHandler ); _uploadRouteUrl = urlHelper.RouteUrl(FileUploadController.UploadRouteName, new { handlerId = GetHandlerId() }); if (_uploadRouteUrl == null) { throw new InvalidOperationException("Failed to generate upload route"); } }
public FileListEntryStream(IJSRuntime jsRuntime, ElementReference inputFileElement, FileListEntryImpl file) { _jsRuntime = jsRuntime; _inputFileElement = inputFileElement; _file = file; }
public SharedMemoryFileListEntryStream(IJSRuntime jsRuntime, ElementReference inputFileElement, FileListEntryImpl file) : base(jsRuntime, inputFileElement, file) { }
public RemoteFileListEntryStream(IJSRuntime jsRuntime, ElementReference inputFileElement, FileListEntryImpl file, int maxMessageSize, int maxBufferSize) : base(jsRuntime, inputFileElement, file) { _maxMessageSize = maxMessageSize; _blockSequence = new PreFetchingSequence <Block>( FetchBase64Block, (file.Size + _maxMessageSize - 1) / _maxMessageSize, Math.Max(1, maxBufferSize / _maxMessageSize)); // Degree of parallelism on fetch _currentBlockDecodingBuffer = new byte[_maxMessageSize]; }