We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Aktuell wird nur eine zip mit dem Namen site.zip akzeptiert. (Hardcoded)
zip
site.zip
The text was updated successfully, but these errors were encountered:
Mit diesem Code sollte der Bug behoben sein.
func showIndexForm(w http.ResponseWriter, r *http.Request) { cookie, err := r.Cookie("GUID") if err != nil { http.ServeFile(w, r, "upload.html") return } guid := cookie.Value if _, err := os.Stat(guid); os.IsNotExist(err) { // folder with GUID does not exist, create it err = os.Mkdir(guid, 0700) if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) return } // Unzip zip err = os.Mkdir(guid+"/unzipped", 0700) if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) return } fmt.Println(guid + "/site.zip") fmt.Println(guid + "/unzipped") error := unzip(guid+"/site.zip", guid+"/unzipped") if error != nil { log.Fatal(err) } } else if err == nil { // folder with GUID exists, do nothing } http.ServeFile(w, r, "index.html") }
Sorry, something went wrong.
Nein funktioniert nicht.
No branches or pull requests
Aktuell wird nur eine
zip
mit dem Namensite.zip
akzeptiert. (Hardcoded)The text was updated successfully, but these errors were encountered: