@Summary Upload image to luma @Schemes @Description @Accept json @Produce json @Param body body UploadReq true "Upload image params" @Success 200 {object} []FileUploadResult "upload result" @Router /luma/generations/file_upload [post]
(c *gin.Context)
| 78 | // @Success 200 {object} []FileUploadResult "upload result" |
| 79 | // @Router /luma/generations/file_upload [post] |
| 80 | func Upload(c *gin.Context) { |
| 81 | var uploadParams UploadReq |
| 82 | err := c.BindJSON(&uploadParams) |
| 83 | if err != nil { |
| 84 | WrapperLumaError(c, err, http.StatusBadRequest) |
| 85 | return |
| 86 | } |
| 87 | |
| 88 | res, relayErr := uploadFile(uploadParams.Url) |
| 89 | if relayErr != nil { |
| 90 | ReturnLumaError(c, relayErr.ErrorResp, relayErr.StatusCode) |
| 91 | return |
| 92 | } |
| 93 | c.JSON(http.StatusOK, res) |
| 94 | return |
| 95 | } |
| 96 | |
| 97 | // @Summary Get video url without watermark |
| 98 | // @Schemes |
nothing calls this directly
no test coverage detected