stupid linux
This commit is contained in:
1
.vscode/launch.json
vendored
1
.vscode/launch.json
vendored
@@ -10,6 +10,7 @@
|
|||||||
"request": "launch",
|
"request": "launch",
|
||||||
"mode": "auto",
|
"mode": "auto",
|
||||||
"program": "${fileDirname}"
|
"program": "${fileDirname}"
|
||||||
|
,"env": {"msiinfo":"/usr/bin/msiinfo", "exiftool":"/usr/bin/exiftool"}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
4
main.go
4
main.go
@@ -258,9 +258,9 @@ func upload() http.Handler {
|
|||||||
defer tempFile.Close()
|
defer tempFile.Close()
|
||||||
fileBytes,_:=io.ReadAll(file)
|
fileBytes,_:=io.ReadAll(file)
|
||||||
tempFile.Write(fileBytes)
|
tempFile.Write(fileBytes)
|
||||||
fn,_:=os.OpenFile("Data/"+filename, os.O_CREATE, 0666)
|
fn,_:=os.OpenFile("Data/"+filename, os.O_WRONLY|os.O_CREATE, 0666)
|
||||||
|
defer fn.Close()
|
||||||
fn.Write(fileBytes)
|
fn.Write(fileBytes)
|
||||||
fn.Close()
|
|
||||||
log.Println(getDataFromFile("Data/"+filename))
|
log.Println(getDataFromFile("Data/"+filename))
|
||||||
})}
|
})}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user