Documentation
¶
Overview ¶
Package ginupload implements gin handlers for file upload processing
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { upload.Config Path string `long:"path" default:"/img" description:"Image URL path"` UploadPath string `long:"upload_path" default:"/upload" description:"Image upload URL path"` PreviewPath string `long:"preview_path" default:"/preview" description:"Preview image URL path"` }
Config holds all config vars
type File ¶
type File struct { Name string `form:"name" json:"name" binding:"required"` Data string `form:"data" json:"data" binding:"required"` }
File hold JSON request struct
type Service ¶
type Service struct { Config Config // contains filtered or unexported fields }
Service holds ginupload service
func (Service) HandleBase64 ¶
HandleBase64 reads POST with JSON data (data:image/png;base64,...) and returns JSON with links to file and preview
func (Service) HandleMultiPart ¶
HandleMultiPart handles a file received as multipart form
Click to show internal directories.
Click to hide internal directories.