markdown上传的文件权限调整

dev_hjm
cxt 6 years ago
parent eee83bc0d6
commit 8bbb5a71e0

@ -4340,7 +4340,7 @@ module ApplicationHelper
candown = (attachment.is_public == 1 || attachment.is_public == true)
end
else
if attachment.container_type == "MarkDown" || attachment.container_type.nil? || attachment.container_type == "Shixun" || attachment.container_type == "Memo" || attachment.container_type == "Career" || attachment.container_type == "Exercise" || attachment.container_type == "ExerciseBank"
if attachment.container_type == "MarkDown" || attachment.container_type.nil? || attachment.container_type == 'Subject' || attachment.container_type == "Shixun" || attachment.container_type == "Memo" || attachment.container_type == "Career" || attachment.container_type == "Exercise" || attachment.container_type == "ExerciseBank"
candown = true
end
end

@ -78,7 +78,7 @@
placeholder: "请在此输入实训课程的简介",
imageUpload : true,
imageFormats : ["jpg", "jpeg", "gif", "png", "bmp", "webp", "JPG", "JPEG", "GIF", "PNG", "BMP", "WEBP"],
imageUploadURL : "<%= upload_with_markdown_path(:container_id => @subject.id, :container_type => @subject.class) %>" //url
imageUploadURL : "<%= upload_with_markdown_path(:container_id => @subject.id, :container_type => 'MarkDown') %>" //url
});
md_elocalStorage(shixun_editormd, "subject_desc_<%= User.current.id %>", "desc");
/* --------------------------------- 学习须知 -------------------------------------- */

Loading…
Cancel
Save