lib/hydra/works/services/characterization_service.rb
# Determine the filename to send to Hydra::FileCharacterization. If no source is present,
# use the name of the file from the object; otherwise, use the supplied source.
Determine the filename to send to Hydra::FileCharacterization. If no source is present,
use the name of the file from the object; otherwise, use the supplied source.
Determine the filename to send to Hydra :: FileCharacterization . If no source is present use the name of the file from the object ; otherwise use the supplied source .
def file_name
        if source
          source.is_a?(File) ? File.basename(source.path) : File.basename(source)
        else
          object.original_name.nil? ? "original_file" : object.original_name
        end
      end
def file_name if source source . is_a? ( File ) ? File . basename ( source . path ) : File . basename ( source ) else object . original_name . nil? ? "original_file" : object . original_name end end
Determine the filename to send to Hydra::FileCharacterization.
Determine the filename to send to Hydra :: FileCharacterization .