MCPcopy Index your code
hub / github.com/LumaAI-API/Luma-API / Upload

Function Upload

api.go:80–95  ·  view source on GitHub ↗

@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)

Source from the content-addressed store, hash-verified

78// @Success 200 {object} []FileUploadResult "upload result"
79// @Router /luma/generations/file_upload [post]
80func 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

Callers

nothing calls this directly

Calls 3

WrapperLumaErrorFunction · 0.85
uploadFileFunction · 0.85
ReturnLumaErrorFunction · 0.85

Tested by

no test coverage detected