stupid linux
This commit is contained in:
4
main.go
4
main.go
@@ -258,9 +258,9 @@ func upload() http.Handler {
|
||||
defer tempFile.Close()
|
||||
fileBytes,_:=io.ReadAll(file)
|
||||
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.Close()
|
||||
log.Println(getDataFromFile("Data/"+filename))
|
||||
})}
|
||||
|
||||
|
Reference in New Issue
Block a user