Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Media ¶
type Media struct { ID primitive.ObjectID `bson:"_id" json:"id"` User primitive.ObjectID `bson:"_user" json:"user"` Name string `bson:"name" json:"name"` Paths Path `bson:"paths" json:"paths"` Type string `bson:"type" json:"type"` Size int64 `bson:"size" json:"size"` CreatedAt time.Time `bson:"created_at" json:"created_at"` }
Media model
type Path ¶
type Path struct { Original string `bson:"original" json:"original"` Large string `bson:"large" json:"large"` Medium string `bson:"medium" json:"medium"` Small string `bson:"small" json:"small"` }
Path model
func UploadFile ¶
func UploadFile(file *multipart.FileHeader) (*Path, error)
UploadFile upload files
Click to show internal directories.
Click to hide internal directories.