@ -106,9 +106,11 @@ class FileController extends Controller
*/
public function delete(string $id): JsonResponse
{
$success = Storage::delete([
"tmp/{$id}.odt"
]);
Storage::deleteDirectory("contracts/${id}");
$tmpFiles = Storage::allFiles("tmp");
$success = Storage::delete($tmpFiles);
return response()->json(['success' => $success]);
}
@ -145,6 +145,7 @@ export default class ProcessFile extends Vue {
blockScroll: false,
accept: () => {
window.location.href = url;
this.$api.discardFile(this.file.id);
},
reject: () => {
// TODO: Show a message to the user that the action was cancelled.