MCPcopy Create free account
hub / github.com/53AI/53AIHub / getWPSFileDownload

Function getWPSFileDownload

api/controller/wps.go:228–244  ·  view source on GitHub ↗
(c *gin.Context)

Source from the content-addressed store, hash-verified

226}
227
228func getWPSFileDownload(c *gin.Context) (any, error) {
229 // if c.GetHeader("Referer") != "https://solution.wps.cn" {
230 // c.String(http.StatusForbidden, "invalid referer")
231 // return
232 // }
233 file, wpsErr := getWPSFileCommon(c, true)
234 if wpsErr != nil {
235 return nil, wpsErr
236 }
237 downloadURL := file.UploadFile.GetPreviewOrOssDownloadUrl()
238
239 response := gin.H{
240 "url": downloadURL,
241 }
242
243 return response, nil
244}
245
246func getWPSFilePermission(c *gin.Context) (any, error) {
247 file, wpsErr := getWPSFileCommon(c, true)

Callers

nothing calls this directly

Calls 2

getWPSFileCommonFunction · 0.85

Tested by

no test coverage detected