upload_file

package
v1.7.12 Latest Latest
Warning

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

Go to latest
Published: May 7, 2026 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

View Source
const MAX_FILE_UPLOAD = 1 * gb
View Source
const PUBLIC_PATH = "public"

Variables

View Source
var (
	IMAGES_EXTENSIONS = []string{".jpg", ".jpeg", extPNG, ".gif", ".svg", ".webp"}
	VIDEOS_EXTENSIONS = []string{extWebM}
	AUDIO_EXTENSIONS  = []string{".wave", ".ogg", ".opus", extMP3}
)

Functions

func RecordAudioForm added in v1.7.0

func RecordAudioForm(r xlog.Request) xlog.Output

RecordAudioForm renders the audio recording interface for a specified page. It accepts a page name via the "page" form parameter and returns an HTML interface that allows users to record audio using their microphone and save it to the page.

func RecordCameraForm added in v1.7.0

func RecordCameraForm(r xlog.Request) xlog.Output

RecordCameraForm renders the camera recording interface for a specified page. It accepts a page name via the "page" form parameter and returns an HTML interface that allows users to record video using their camera and save it to the page.

func RecordScreenForm added in v1.7.0

func RecordScreenForm(r xlog.Request) xlog.Output

RecordScreenForm renders the screen recording interface for a specified page. It accepts a page name via the "page" form parameter and returns an HTML interface that allows users to record their screen and save the recording to the page.

func ScreenshotForm added in v1.7.0

func ScreenshotForm(r xlog.Request) xlog.Output

ScreenshotForm renders the screenshot capture interface for a specified page. It accepts a page name via the "page" form parameter and returns an HTML interface that allows users to capture and save screenshots directly to the page.

func UploadForm added in v1.7.0

func UploadForm(r xlog.Request) xlog.Output

UploadForm renders the file upload form for a specified page. It accepts a page name via the "page" form parameter and returns an HTML form that allows users to upload files to that page's directory.

Types

type RecordAudio added in v1.7.0

type RecordAudio struct {
	// contains filtered or unexported fields
}

func (RecordAudio) Attrs added in v1.7.0

func (s RecordAudio) Attrs() map[template.HTMLAttr]any

func (RecordAudio) Icon added in v1.7.0

func (RecordAudio) Icon() string

func (RecordAudio) Name added in v1.7.0

func (RecordAudio) Name() string

type RecordCamera added in v1.7.0

type RecordCamera struct {
	// contains filtered or unexported fields
}

func (RecordCamera) Attrs added in v1.7.0

func (s RecordCamera) Attrs() map[template.HTMLAttr]any

func (RecordCamera) Icon added in v1.7.0

func (RecordCamera) Icon() string

func (RecordCamera) Name added in v1.7.0

func (RecordCamera) Name() string

type RecordScreen added in v1.7.0

type RecordScreen struct {
	// contains filtered or unexported fields
}

func (RecordScreen) Attrs added in v1.7.0

func (s RecordScreen) Attrs() map[template.HTMLAttr]any

func (RecordScreen) Icon added in v1.7.0

func (RecordScreen) Icon() string

func (RecordScreen) Name added in v1.7.0

func (RecordScreen) Name() string

type Screenshot added in v1.7.0

type Screenshot struct {
	// contains filtered or unexported fields
}

func (Screenshot) Attrs added in v1.7.0

func (s Screenshot) Attrs() map[template.HTMLAttr]any

func (Screenshot) Icon added in v1.7.0

func (Screenshot) Icon() string

func (Screenshot) Name added in v1.7.0

func (Screenshot) Name() string

type Upload added in v1.7.0

type Upload struct {
	// contains filtered or unexported fields
}

func (Upload) Attrs added in v1.7.0

func (u Upload) Attrs() map[template.HTMLAttr]any

func (Upload) Icon added in v1.7.0

func (Upload) Icon() string

func (Upload) Name added in v1.7.0

func (Upload) Name() string

type UploadFile added in v1.7.0

type UploadFile struct{}

func (UploadFile) Init added in v1.7.0

func (UploadFile) Init()

func (UploadFile) Name added in v1.7.0

func (UploadFile) Name() string

Jump to

Keyboard shortcuts

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