mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-12-20 13:23:10 +00:00
Merge remote-tracking branch 'origin/asyncio' into asyncio
This commit is contained in:
commit
db69b93100
@ -32,16 +32,19 @@ class UploadHandler:
|
||||
api_version=None
|
||||
)
|
||||
def index(request, response):
|
||||
image_files = []
|
||||
uploaded_files = []
|
||||
try:
|
||||
for root, _, files in os.walk(UploadHandler.image_directory()):
|
||||
for filename in files:
|
||||
image_file = os.path.join(root, filename)
|
||||
if os.access(image_file, os.X_OK):
|
||||
image_files.append(image_file)
|
||||
uploaded_files.append(image_file)
|
||||
except OSError:
|
||||
pass
|
||||
response.template("upload.html", files=image_files)
|
||||
iourc_path = os.path.join(os.path.expanduser("~/"), ".iourc")
|
||||
if os.path.exists(iourc_path):
|
||||
uploaded_files.append(iourc_path)
|
||||
response.template("upload.html", files=uploaded_files)
|
||||
|
||||
@classmethod
|
||||
@Route.post(
|
||||
|
Loading…
Reference in New Issue
Block a user