mirror of
https://github.com/akuker/RASCSI.git
synced 2024-11-26 13:49:21 +00:00
Fix image dir paths that was broken by refactoring (#329)
* Fix image download that was broken by images dir refactoring * Fix two more instances of image dir path construction
This commit is contained in:
parent
156367a827
commit
8e0e0c89ac
@ -171,7 +171,7 @@ def download_file_to_iso(scsi_id, url):
|
||||
tmp_dir = "/tmp/" + str(tmp_ts) + "/"
|
||||
os.mkdir(tmp_dir)
|
||||
tmp_full_path = tmp_dir + file_name
|
||||
iso_filename = server_info["image_dir"] + file_name + ".iso"
|
||||
iso_filename = f"{server_info['image_dir']}/{file_name}.iso"
|
||||
|
||||
try:
|
||||
urllib.request.urlretrieve(url, tmp_full_path)
|
||||
@ -203,7 +203,7 @@ def download_image(url):
|
||||
server_info = get_server_info()
|
||||
|
||||
file_name = url.split("/")[-1]
|
||||
full_path = server_info["image_dir"] + file_name
|
||||
full_path = f"{server_info['image_dir']}/{file_name}"
|
||||
|
||||
try:
|
||||
urllib.request.urlretrieve(url, full_path)
|
||||
|
@ -583,7 +583,7 @@ def create_file():
|
||||
def download():
|
||||
image = request.form.get("image")
|
||||
server_info = get_server_info()
|
||||
return send_file(server_info["image_dir"] + image, as_attachment=True)
|
||||
return send_file(f"{server_info['image_dir']}/{image}", as_attachment=True)
|
||||
|
||||
|
||||
@app.route("/files/delete", methods=["POST"])
|
||||
|
Loading…
Reference in New Issue
Block a user