Versions in this module Expand all Collapse all v2 v2.0.0 Apr 9, 2024 Changes in this version + const MediaAudio + const MediaImage + const MediaVideo + const OpCancelType + const OpDeleteType + const OpOrphansV1Type + var WebFiles embed.FS + func CleanName(name string) string + func FileFromName(id etx.TxId, version int, name string) string + func NameFromFile(fileName string) string + func Status(filename string) int + func Thumbnail(filename string) string + type Bind struct + func (b *Bind) End() error + func (b *Bind) File(fileName string) (string, error) + type Claim struct + func (c *Claim) End(fn Uploaded) + func (c *Claim) EndV1() + func (c *Claim) File(name string) + func (c *Claim) FileV1(name string) + type DB interface + Begin func() func() + type OpCancel struct + type OpDelete struct + Name string + type Uploaded func(error) + type Uploader struct + AudioTypes []string + DeleteAfter time.Duration + FilePath string + MaxAge time.Duration + MaxH int + MaxSize int + MaxW int + SnapshotAt time.Duration + ThumbH int + ThumbW int + VideoPackage string + VideoResolution int + VideoTypes []string + func (up *Uploader) Begin() (string, error) + func (up *Uploader) Commit(tx etx.TxId) error + func (up *Uploader) Delete(tx etx.TxId, filename string) error + func (up *Uploader) ForOperation(opType int) etx.Op + func (up *Uploader) Initialise(log *log.Logger, db DB, tm *etx.TM) + func (up *Uploader) MediaType(name string) int + func (up *Uploader) Name() string + func (up *Uploader) Operation(id etx.TxId, opType int, op etx.Op) + func (up *Uploader) Save(fh *multipart.FileHeader, tx etx.TxId, version int) (err error, byClient bool) + func (up *Uploader) StartBind(tx etx.TxId) *Bind + func (up *Uploader) StartClaim(tx etx.TxId) *Claim + func (up *Uploader) StartClaimV1(tx etx.TxId) *Claim + func (up *Uploader) Stop() + func (up *Uploader) V1() + func (up *Uploader) ValidCode(tx etx.TxId) bool Other modules containing this package github.com/inchworks/webparts