mirror of
https://github.com/akuker/RASCSI.git
synced 2024-12-21 08:29:59 +00:00
Fix bugs in the upload to images form (#1111)
* Fix formatting of the image subdir list for uploading * Fix upload path
This commit is contained in:
parent
282c639438
commit
ddf258db57
@ -15,11 +15,8 @@
|
||||
<input type="radio" name="destination" id="disk_images" value="disk_images" checked="checked">
|
||||
<label for="disk_images">{{ _("Disk Images") }}</label>
|
||||
<select name="subdir" id="subdir">
|
||||
<option value="">images/</option>
|
||||
{% for subdir, group in formatted_image_files.items() %}
|
||||
{% if subdir != "/" %}
|
||||
<option value="{{subdir}}">images/{{subdir}}</option>
|
||||
{% endif %}
|
||||
<option value="{{subdir}}"{% if subdir == "images/" %} selected{% endif %}>{{subdir}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<input type="radio" name="destination" id="shared_files" value="shared_files">
|
||||
|
@ -990,7 +990,7 @@ def upload_file():
|
||||
return make_response(auth["msg"], 403)
|
||||
|
||||
destination = request.form.get("destination")
|
||||
subdir = request.form.get("subdir")
|
||||
subdir = request.form.get("subdir").replace("images/", "", 1)
|
||||
if destination == "disk_images":
|
||||
safe_path = is_safe_path(Path(subdir))
|
||||
if not safe_path["status"]:
|
||||
|
Loading…
Reference in New Issue
Block a user