File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ func (s *Server) handleMultipartUpload(c *gin.Context) {
9494
9595 // Create directory
9696 dir := filepath .Dir (safePath )
97- if err := os . MkdirAll (dir , 0755 ); err != nil {
97+ if err := s . mkdirSafe (dir ); err != nil {
9898 c .JSON (http .StatusInternalServerError , gin.H {
9999 "error" : fmt .Sprintf ("Failed to create directory: %v" , err ),
100100 "code" : http .StatusInternalServerError ,
@@ -186,7 +186,7 @@ func (s *Server) handleJSONBase64Upload(c *gin.Context) {
186186
187187 // Create directory
188188 dir := filepath .Dir (safePath )
189- if err := os . MkdirAll (dir , 0755 ); err != nil {
189+ if err := s . mkdirSafe (dir ); err != nil {
190190 c .JSON (http .StatusInternalServerError , gin.H {
191191 "error" : fmt .Sprintf ("Failed to create directory: %v" , err ),
192192 "code" : http .StatusInternalServerError ,
You can’t perform that action at this time.
0 commit comments