(c *gin.Context)
| 226 | } |
| 227 | |
| 228 | func 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 | |
| 246 | func getWPSFilePermission(c *gin.Context) (any, error) { |
| 247 | file, wpsErr := getWPSFileCommon(c, true) |
nothing calls this directly
no test coverage detected