mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-05 23:01:15 +02:00
Bump version to 1.0-alpha2.
This commit is contained in:
1 parent
732afb4ebd
commit
ada36e5382
3 files changed
+11
-10
No files matched your search
@@ -72,10 +72,11 @@ class FileUploadHandler(tornado.web.RequestHandler):
|
||||
Invoked on POST request.
|
||||
"""
|
||||
|
||||
fileinfo = self.request.files["file"][0]
|
||||
destination_path = os.path.join(self._upload_dir, fileinfo['filename'])
|
||||
with open(destination_path, 'wb') as f:
|
||||
f.write(fileinfo['body'])
|
||||
st = os.stat(destination_path)
|
||||
os.chmod(destination_path, st.st_mode | stat.S_IXUSR)
|
||||
if "file" in self.request.files:
|
||||
fileinfo = self.request.files["file"][0]
|
||||
destination_path = os.path.join(self._upload_dir, fileinfo['filename'])
|
||||
with open(destination_path, 'wb') as f:
|
||||
f.write(fileinfo['body'])
|
||||
st = os.stat(destination_path)
|
||||
os.chmod(destination_path, st.st_mode | stat.S_IXUSR)
|
||||
self.redirect("/upload")
|
||||
Reference in new issue
Block a user