程序包 cn.zhxu.toys.oss

接口 OssManager

所有已知实现类:
AbstractOssManager, AliyunOssManager

public interface OssManager
对象存储管理器
作者:
Troy
  • 方法详细资料

    • upload

      String upload(String key, File file)
      上传文件
      参数:
      key - 键
      file - 文件
      返回:
      文件访问路径
    • upload

      String upload(String key, String contentType, InputStream inputStream)
      上传文件
      参数:
      key - 键
      contentType - 类型
      inputStream - 输入流
      返回:
      文件访问路径
    • upload

      String upload(String fileName, String key, String contentType, InputStream inputStream)
      上传文件(指定文件名)
      参数:
      fileName - 文件名
      key - 键
      contentType - 类型
      inputStream - 输入流
      返回:
      文件访问路径
    • access

      InputStream access(String key)
      访问文件
      参数:
      key - 键
      返回:
      文件输入流
    • delete

      boolean delete(String fileUrl)
      删除文件
      参数:
      fileUrl - 文件 URL
      返回:
      true if deleted