diff options
Diffstat (limited to 'app/uploaders/file_uploader.rb')
-rw-r--r-- | app/uploaders/file_uploader.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/uploaders/file_uploader.rb b/app/uploaders/file_uploader.rb index 25d879ff449..730153a4740 100644 --- a/app/uploaders/file_uploader.rb +++ b/app/uploaders/file_uploader.rb @@ -32,6 +32,10 @@ class FileUploader < CarrierWave::Uploader::Base File.join("/uploads", @secret, file.filename) end + def to_markdown + to_h[:markdown] + end + def to_h filename = image? ? self.file.basename : self.file.filename escaped_filename = filename.gsub("]", "\\]") |