mimebody

package
v0.0.0-...-0928558 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: MIT Imports: 4 Imported by: 1

README

mimebody

-- import "github.com/cmcoffee/snugforge/mimebody"

Usage

func ConvertForm
func ConvertForm(request *http.Request, fieldname string, add_fields map[string]string)

Transforms body of request to mime multipart upload. Request body should be io.ReadCloser of file being transfered. fieldname specifies field for content.

func ConvertFormFile
func ConvertFormFile(request *http.Request, fieldname string, filename string, add_fields map[string]string, byte_limit int64)

Transforms body of request to mime multipart upload. Request body should be io.ReadCloser of file being transfered. fieldname specified field for content, filename should be filename of file. if byte_limit is > 0, original request.Body will need to be closed outside of function.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertForm

func ConvertForm(request *http.Request, fieldname string, add_fields map[string]string)

Transforms body of request to mime multipart upload. Request body should be io.ReadCloser of file being transfered. fieldname specifies field for content.

func ConvertFormFile

func ConvertFormFile(request *http.Request, fieldname string, filename string, add_fields map[string]string, byte_limit int64)

Transforms body of request to mime multipart upload. Request body should be io.ReadCloser of file being transfered. fieldname specified field for content, filename should be filename of file. if byte_limit is > 0, original request.Body will need to be closed outside of function.

Types

This section is empty.

Jump to

Keyboard shortcuts

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