File deletion now working on backend
@@ -102,16 +102,9 @@ def files(dataset: Dataset):
@require_dataset
def delete(dataset: Dataset):
if request.method == 'POST':
- data = {"files": dataset.files}
- if dataset.importer is not None:
- # maybe a comment here will force this file update?
- dataset.validate()
+ dataset.remove_file(request.form["file"])
dataset.refresh_ui()
- data.update({
- 'settings': dataset.importer.get_settings(),
- "ui": dataset.importer.get_ui(),
- "importer_name": dataset.importer.get_name()
- })
+ data = {"files": dataset.files}
return jsonify({
"status": 200,
"data": data,
