Search Results for

    Show / Hide Table of Contents

    Class StorageService

    Implementation of the storage service for managing file storage operations.

    Inheritance
    object
    StorageService
    Implements
    IStorageService
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: OEMS.Core.Application.ApplicationServices
    Assembly: OEMS.Core.dll
    Syntax
    public class StorageService : IStorageService

    Methods

    DeleteFileAsync(string)

    Deletes a file from the storage system.

    Declaration
    public Task DeleteFileAsync(string path)
    Parameters
    Type Name Description
    string path

    The path or identifier of the file to delete

    Returns
    Type Description
    Task

    A task representing the asynchronous operation

    GetPublicUrl(string)

    Gets a public URL for accessing a stored file.

    Declaration
    public Task<string> GetPublicUrl(string path)
    Parameters
    Type Name Description
    string path

    The path or identifier of the file

    Returns
    Type Description
    Task<string>

    A public URL that can be used to access the file

    LoadFileAsync(string)

    Loads a file from the storage system.

    Declaration
    public Task<byte[]> LoadFileAsync(string path)
    Parameters
    Type Name Description
    string path

    The path or identifier of the file to load

    Returns
    Type Description
    Task<byte[]>

    The file content as a byte array

    SaveFileAsync(Stream, string)

    Saves a file from a stream to the storage system.

    Declaration
    public Task<string> SaveFileAsync(Stream fileStream, string fileName)
    Parameters
    Type Name Description
    Stream fileStream

    The stream containing the file data

    string fileName

    The name to assign to the saved file

    Returns
    Type Description
    Task<string>

    The path or identifier of the saved file

    Implements

    IStorageService
    In this article
    Back to top Generated by DocFX