Documentation ¶
Overview ¶
Package files represents the file resource
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllowedParams ¶
func AllowedParams() []string
AllowedParams returns an array of allowed param keys
func AllowedParamsCreate ¶
func AllowedParamsCreate() []string
AllowedParamsCreate returns only one param which may be added on file upload (sender) Other params are set after create
func Create ¶
Create inserts a new record in the database using params, and returns the newly created id
Types ¶
type File ¶
type File struct { model.Model status.ModelStatus Path string Sender string SenderID int64 UserID int64 }
File handles saving and retreiving files from the database
func NewWithColumns ¶
NewWithColumns creates a new file instance and fills it with data from the database cols provided
func (*File) NewFilePath ¶
func (m *File) NewFilePath(fh *multipart.FileHeader) error
NewFilePath sets a default path for this file.
Click to show internal directories.
Click to hide internal directories.