From 0b374491ac024d2c450fdbc9140eee7051f9164e Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Wed, 28 Sep 2022 10:58:52 +0200 Subject: [PATCH] Link to protected_upload_path in file render --- app/views/shared/_file.html.slim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/shared/_file.html.slim b/app/views/shared/_file.html.slim index e8863f5c..8759944f 100644 --- a/app/views/shared/_file.html.slim +++ b/app/views/shared/_file.html.slim @@ -7,4 +7,4 @@ - if file.teacher_defined_assessment? = row(label: 'file.feedback_message', value: render_markdown(file.feedback_message), class: 'm-0') = row(label: 'file.weight', value: file.weight) -= row(label: 'file.content', value: file.native_file? ? link_to_if(policy(file).show?, file.native_file.file.filename, file.native_file.url) : code_tag(file.content, file.file_type.programming_language)) += row(label: 'file.content', value: file.native_file? ? link_to_if(policy(file).show?, file.native_file.file.filename, protected_upload_path(id: file.id, filename: file.filepath)) : code_tag(file.content, file.file_type.programming_language))