Class: GeoConcerns::Actors::FileActor
- Inherits:
-
CurationConcerns::Actors::FileActor
- Object
- CurationConcerns::Actors::FileActor
- GeoConcerns::Actors::FileActor
- Defined in:
- app/actors/geo_concerns/actors/file_actor.rb
Instance Method Summary collapse
- #ingest_file(file) ⇒ Object
-
#mime_type(file) ⇒ String
Determines the correct mime type for a file.
Instance Method Details
#ingest_file(file) ⇒ Object
4 5 6 7 8 9 10 |
# File 'app/actors/geo_concerns/actors/file_actor.rb', line 4 def ingest_file(file) IngestFileJob.perform_later(file_set, working_file(file), user, (file)) true end |
#mime_type(file) ⇒ String
Determines the correct mime type for a file. If the mime type is stored on the file_set (set in the view), then use that value. If not, use the file content type, if it exists.
17 18 19 20 |
# File 'app/actors/geo_concerns/actors/file_actor.rb', line 17 def mime_type(file) return file_set.geo_mime_type if file_set.geo_mime_type file.respond_to?(:content_type) ? file.content_type : nil || file_set.geo_mime_type end |