File tree Expand file tree Collapse file tree 1 file changed +0
-9
lines changed Expand file tree Collapse file tree 1 file changed +0
-9
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ import (
17
17
"os"
18
18
"math/rand"
19
19
"strings"
20
- "strconv"
21
20
gs "github.com/R4yGM/garlicshare/size"
22
21
)
23
22
@@ -364,10 +363,6 @@ func Upload(){
364
363
} else {
365
364
w .Header ().Set ("Content-Disposition" , "attachment; filename=" + path )
366
365
w .Header ().Set ("Content-Type" , "application/octet-stream" )
367
- fi , err := os .Stat (path )
368
- if err != nil {
369
- }
370
- w .Header ().Set ("Content-Lenght" , strconv .FormatInt (int64 (fi .Size ()), 10 ))
371
366
http .ServeFile (w , r , path )
372
367
}
373
368
}else {
@@ -383,10 +378,6 @@ func Upload(){
383
378
} else {
384
379
w .Header ().Set ("Content-Disposition" , "attachment; filename=" + path )
385
380
w .Header ().Set ("Content-Type" , "application/octet-stream" )
386
- fi , err := os .Stat (path )
387
- if err != nil {
388
- }
389
- w .Header ().Set ("Content-Lenght" , strconv .FormatInt (int64 (fi .Size ()), 10 ))
390
381
http .ServeFile (w , r , path )
391
382
}
392
383
}
You can’t perform that action at this time.
0 commit comments