Class: API::Entities::WikiAttachment

Inherits:
Grape::Entity
  • Object
show all
Includes:
Gitlab::FileMarkdownLinkBuilder
Defined in:
lib/api/entities/wiki_attachment.rb

Constant Summary

Constants included from Gitlab::FileTypeDetection

Gitlab::FileTypeDetection::DANGEROUS_AUDIO_EXT, Gitlab::FileTypeDetection::DANGEROUS_IMAGE_EXT, Gitlab::FileTypeDetection::DANGEROUS_VIDEO_EXT, Gitlab::FileTypeDetection::PDF_EXT, Gitlab::FileTypeDetection::SAFE_AUDIO_EXT, Gitlab::FileTypeDetection::SAFE_IMAGE_EXT, Gitlab::FileTypeDetection::SAFE_IMAGE_FOR_SCALING_EXT, Gitlab::FileTypeDetection::SAFE_VIDEO_EXT

Instance Method Summary collapse

Methods included from Gitlab::FileMarkdownLinkBuilder

#markdown_link, #markdown_name

Methods included from Gitlab::FileTypeDetection

#audio?, #dangerous_audio?, #dangerous_embeddable?, #dangerous_image?, #dangerous_video?, #embeddable?, extension_match?, #image?, #image_safe_for_scaling?, #pdf?, #video?

Instance Method Details

#filenameObject


18
19
20
# File 'lib/api/entities/wiki_attachment.rb', line 18

def filename
  object.file_name
end

#secure_urlObject


22
23
24
# File 'lib/api/entities/wiki_attachment.rb', line 22

def secure_url
  object.file_path
end