pupload

package
v1.6.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

上传文件到本地目录

腾讯云COS对象存储操作

文件上传工具

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CosConfig

type CosConfig struct {
	AppId      string // 应用ID
	SecretId   string // 秘钥ID
	SecretKey  string // 秘钥值
	Bucket     string // 存储桶名称
	Region     string // 指定地域
	PartSize   int64  // 分片上传块大小,单位MB
	DefaultUrl string // 默认访问地址
	CdnUrl     string // 自定义域名地址
	Folder     string // 虚拟路径
}

腾讯云COS对象存储配置结构体

type LocalConfig

type LocalConfig struct {
	UploadDir string // 文件存储地址
}

本地上传配置结构体

type Object

type Object = cos.Object

type ObjectTag

type ObjectTag = cos.ObjectTaggingTag

type Uploader

type Uploader struct {
	Local      *localFile
	TencentCos *tencentCos
}

func Instance

func Instance(conf interface{}) (c Uploader)

Instance conf: interface{} 上传方式配置

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL