upload.go 864 B

123456789101112131415161718192021222324252627282930313233343536
  1. package model
  2. const (
  3. // MaxUploadSize max upload file size
  4. MaxUploadSize = 20 * 1024 * 1024
  5. )
  6. // UploadActionType report action type
  7. type UploadActionType int
  8. // report action type
  9. const (
  10. UploadInternal UploadActionType = iota + 1 // 内网用户
  11. UploadInternalAdmin // 内网管理员
  12. UploadPublic // 外网公用
  13. UploadApp // 外网 app
  14. UploadWeb // 外网web
  15. )
  16. func (a UploadActionType) String() (s string) {
  17. switch a {
  18. case UploadInternal:
  19. s = "internal_upload"
  20. case UploadInternalAdmin:
  21. s = "internal_admin_upload"
  22. case UploadPublic:
  23. s = "outer_public_upload"
  24. case UploadApp:
  25. s = "outer_app_upload"
  26. case UploadWeb:
  27. s = "outer_web_upload"
  28. default:
  29. s = "undefined_upload"
  30. }
  31. return
  32. }