fix: add options routes for basic upload

This commit is contained in:
Derrick Hammer 2024-03-18 14:06:58 -04:00
parent 455b793db6
commit 65278cb046
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 4 additions and 2 deletions

View File

@ -200,6 +200,8 @@ func (s *S5API) Routes() (*httprouter.Router, error) {
// Upload API
"POST /s5/upload": middleware.ApplyMiddlewares(s.smallFileUpload, uploadCors.Handler, authMw),
"POST /s5/upload/directory": middleware.ApplyMiddlewares(s.directoryUpload, uploadCors.Handler, authMw),
"OPTIONS /s5/upload": middleware.ApplyMiddlewares(s.smallFileUpload, uploadCors.Handler, authMw),
"OPTIONS /s5/upload/directory": middleware.ApplyMiddlewares(s.directoryUpload, uploadCors.Handler, authMw),
// Tus API
"POST /s5/upload/tus": tusHandler,