uploads

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2023 License: MIT Imports: 8 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 // CDN加速地址
	Folder     string // 指定虚拟目录
}

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

type LocalConfig

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

本地上传配置结构体

type Upload

type Upload struct {
	Local      *localFile
	TencentCos *tencentCos
}

func Instance

func Instance(conf interface{}) (c Upload, typ interface{})

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

Jump to

Keyboard shortcuts

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