multiparts

package
v0.0.0-...-4aaf4b1 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package multiparts @Link https://gitee.com/linngc/central-mirror @Copyright Copyright (c) 2024 central-mirror CLI @Author linngc @License

Package multiparts @Link https://gitee.com/linngc/central-mirror @Copyright Copyright (c) 2024 central-mirror CLI @Author linngc @License

Package multiparts @Link https://gitee.com/linngc/central-mirror @Copyright Copyright (c) 2024 central-mirror CLI @Author linngc @License

Package multiparts @Link https://gitee.com/linngc/central-mirror @Copyright Copyright (c) 2024 central-mirror CLI @Author linngc @License

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMultipartByte

func GetMultipartByte(ctx context.Context, ff *ghttp.UploadFile) (b []byte, fileName string, isImage int, size int64, err error)

GetMultipartByte 根据上传的附件,获取附件信息

func MultipartFilter

func MultipartFilter(r *ghttp.Request)

MultipartFilter 过滤上传附件检查

func OnCacheCfg

func OnCacheCfg(str string)

OnCacheCfg 初始化配置参数信息到内存 @param str string

Types

type CacheConfig

type CacheConfig struct {
	Enabled     bool   `yaml:"enabled" default:"false"  dc:"默认支持文件上传"`
	MaxFileSize string `yaml:"maxFileSize" default:"20MB" dc:"最大支持文件大小"`
	FilType     string `yaml:"filType" default:"" dc:"上传附件白名单"`
}

func GetCacheConfig

func GetCacheConfig() *CacheConfig

GetCacheConfig 获取配置的资源文件信息

Jump to

Keyboard shortcuts

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