ILinkedBinaryDataSource
Namespace: Meshmakers.Octo.Runtime.Contracts.Repositories
Interface for handling large binary files in the repository.
public interface ILinkedBinaryDataSource
Methods
UploadFileSystemBinaryAsync(IOctoSession, RtEntityId, String, String, Stream, CancellationToken)
Uploads a large binary file to the repository
Task<OctoObjectId> UploadFileSystemBinaryAsync(IOctoSession session, RtEntityId rtEntityId, string filename, string contentType, Stream stream, CancellationToken cancellationToken)
Parameters
session
IOctoSession
Session object for transaction handling
rtEntityId
RtEntityId
Runtime entity id of the associated entity
filename
String
Filename of the file
contentType
String
Content type of the file
stream
Stream
Binary stream of the file
cancellationToken
CancellationToken
An optional cancellation token
Returns
UploadTemporaryBinaryAsync(IOctoSession, String, String, DateTime, Stream, CancellationToken)
Uploads a large binary file to the repository
Task<OctoObjectId> UploadTemporaryBinaryAsync(IOctoSession session, string filename, string contentType, DateTime expiryDateTime, Stream stream, CancellationToken cancellationToken)
Parameters
session
IOctoSession
Session object for transaction handling
filename
String
Filename of the file
contentType
String
Content type of the file
expiryDateTime
DateTime
Expiry date time of the file
stream
Stream
Binary stream of the file
cancellationToken
CancellationToken
An optional cancellation token
Returns
ReplaceFileSystemBinaryAsync(IOctoSession, OctoObjectId, String, String, Stream, CancellationToken)
Replaces a large binary file in the repository based on the large binary id
Task ReplaceFileSystemBinaryAsync(IOctoSession session, OctoObjectId largeBinaryId, string filename, string contentType, Stream stream, CancellationToken cancellationToken)
Parameters
session
IOctoSession
Session object for transaction handling
largeBinaryId
OctoObjectId
Object id of the large binary
filename
String
Filename of the file
contentType
String
Content type of the file
stream
Stream
Stream of the file
cancellationToken
CancellationToken
An optional cancellation token
Returns
ReplaceTemporaryLargeBinaryAsync(IOctoSession, String, String, Stream, CancellationToken)
Replaces a large binary file in the repository based on the filename and binary type
Task<OctoObjectId> ReplaceTemporaryLargeBinaryAsync(IOctoSession session, string filename, string contentType, Stream stream, CancellationToken cancellationToken)
Parameters
session
IOctoSession
Session object for transaction handling
filename
String
Filename of the file
contentType
String
Content type of the file
stream
Stream
Stream of the file
cancellationToken
CancellationToken
An optional cancellation token
Returns
Task<OctoObjectId>
Object id of the large binary
DeleteAllFileSystemBinariesAsync(IOctoSession, RtEntityId, CancellationToken)
Deletes all large binary files from the repository based on the runtime entity id
Task DeleteAllFileSystemBinariesAsync(IOctoSession session, RtEntityId rtEntityId, CancellationToken cancellationToken)
Parameters
session
IOctoSession
Session object for transaction handling
rtEntityId
RtEntityId
Runtime entity id of the associated entity
cancellationToken
CancellationToken
An optional cancellation token
Returns
DeleteTemporaryLargeBinaryAsync(IOctoSession, OctoObjectId, CancellationToken)
Deletes a large binary file from the repository
Task DeleteTemporaryLargeBinaryAsync(IOctoSession session, OctoObjectId largeBinaryId, CancellationToken cancellationToken)
Parameters
session
IOctoSession
Session object for transaction handling
largeBinaryId
OctoObjectId
Object id of the large binary
cancellationToken
CancellationToken
An optional cancellation token
Returns
DownloadBinaryAsync(IOctoSession, OctoObjectId, CancellationToken)
Downloads a large binary file from the repository based on the large binary id
Task<IDownloadStreamHandler> DownloadBinaryAsync(IOctoSession session, OctoObjectId largeBinaryId, CancellationToken cancellationToken)
Parameters
session
IOctoSession
Session object for transaction handling
largeBinaryId
OctoObjectId
Object id of the large binary
cancellationToken
CancellationToken
An optional cancellation token
Returns
Task<IDownloadStreamHandler>
Handler for the download stream
GetFileSystemBinaryAsync(IOctoSession, OctoObjectId, CancellationToken)
Gets a large binary file from the repository based on the large binary id
Task<IBinaryInfo> GetFileSystemBinaryAsync(IOctoSession session, OctoObjectId largeBinaryId, CancellationToken cancellationToken)
Parameters
session
IOctoSession
Session object for transaction handling
largeBinaryId
OctoObjectId
Object id of the large binary
cancellationToken
CancellationToken
Optional cancellation token
Returns
Task<IBinaryInfo>
Binary info of the file including size, content type, etc.
GetTemporaryBinaryAsync(IOctoSession, OctoObjectId, CancellationToken)
Gets a large binary file from the repository based on the object id
Task<IBinaryInfo> GetTemporaryBinaryAsync(IOctoSession session, OctoObjectId binaryId, CancellationToken cancellationToken)
Parameters
session
IOctoSession
Session object for transaction handling
binaryId
OctoObjectId
Binary id of the file
cancellationToken
CancellationToken
Optional cancellation token
Returns
Task<IBinaryInfo>
Binary info of the file including size, content type, etc.
GetTemporaryBinaryAsync(IOctoSession, String, CancellationToken)
Gets a large binary file from the repository based on the filename and binary type
Task<IBinaryInfo> GetTemporaryBinaryAsync(IOctoSession session, string fileName, CancellationToken cancellationToken)
Parameters
session
IOctoSession
Session object for transaction handling
fileName
String
Filename of the file
cancellationToken
CancellationToken
Optional cancellation token
Returns
Task<IBinaryInfo>
Binary info of the file including size, content type, etc.