Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFileHandle ¶
func GetFileHandle(c *fiber.Ctx) error
@Summary Download a file from the storage @Description Download a file from the storage @Tags download @Produce json @Security JWT @Param Authorization header string true "Authentication" default(Bearer <Add_token_here>) @Param dir path string true "Directory name" @Param name path string true "File name" @Param uid path string true "User ID" @Success 302 @Failure 400 {object} utils.TelarError @Router /{uid}/{dir}/{name} [get]
func UploadeHandle ¶
func UploadeHandle(c *fiber.Ctx) error
@Summary Upload a file to the storage @Description Upload a file to the storage and return the download URL @Tags upload @Accept multipart/form-data @Produce json @Security JWT @Param Authorization header string true "Authentication" default(Bearer <Add_token_here>) @Param uid path string true "User ID" @Param dir path string true "Directory name" @Param file formData file true "File to upload" @Success 200 {object} object{payload=string} @Failure 400 {object} utils.TelarError @Failure 401 {object} utils.TelarError @Failure 500 {object} utils.TelarError @Router /{uid}/{dir} [post]
Types ¶
This section is empty.