Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow uploading any kind of Stream #33

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Egnyte.Api/Files/FilesClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ public async Task<FolderCreatedResponse> CreateFolder(string path)
/// Creates or updates a file. To upload files larger than 100 MB, use the ChunkedUpload method
/// </summary>
/// <param name="path">Full path to the file</param>
/// <param name="file">Content of a file in a memory stream</param>
/// <param name="file">Content of a file in a stream</param>
/// <returns>Response with checksum and ids.
/// Checksum is a SHA512 hash of entire file that can be used for validating upload integrity</returns>
public async Task<UploadedFileMetadata> CreateOrUpdateFile(string path, MemoryStream file)
public async Task<UploadedFileMetadata> CreateOrUpdateFile(string path, Stream file)
{
if (string.IsNullOrWhiteSpace(path))
{
Expand Down Expand Up @@ -272,7 +272,7 @@ public async Task<bool> DeleteFileOrFolder(string path, string entryId = null)
/// <param name="path">Full path to file</param>
/// <param name="file">Stream with the file content</param>
/// <returns>Uploaded chunk metadata</returns>
public async Task<ChunkUploadedMetadata> ChunkedUploadFirstChunk(string path, MemoryStream file)
public async Task<ChunkUploadedMetadata> ChunkedUploadFirstChunk(string path, Stream file)
{
if (string.IsNullOrWhiteSpace(path))
{
Expand Down Expand Up @@ -355,7 +355,7 @@ public async Task<ChunkUploadedMetadata> ChunkedUploadNextChunk(
string path,
int chunkNumber,
string chunkUploadId,
MemoryStream file)
Stream file)
{
if (string.IsNullOrWhiteSpace(path))
{
Expand Down Expand Up @@ -413,7 +413,7 @@ public async Task<UploadedFileMetadata> ChunkedUploadLastChunk(
string path,
int chunkNumber,
string chunkUploadId,
MemoryStream file)
Stream file)
{
if (string.IsNullOrWhiteSpace(path))
{
Expand Down