init: 0.1.1
feat: login page && auth required todo: 断点上传
This commit is contained in:
1 parent
b3ff70167f
commit
a2635698e0
18 files changed
+677
-35
No files matched your search
@@ -50,6 +50,10 @@ func Fetch() nf.HandlerFunc {
|
||||
func ShareNew() nf.HandlerFunc {
|
||||
return func(c *nf.Ctx) error {
|
||||
|
||||
if opt.Cfg.Auth {
|
||||
return c.SendStatus(http.StatusUnauthorized)
|
||||
}
|
||||
|
||||
filename := strings.TrimSpace(c.Param("filename"))
|
||||
if filename == "" {
|
||||
return c.Status(http.StatusBadRequest).JSON(map[string]string{"msg": "filename required"})
|
||||
|
||||
Reference in new issue
Block a user