Skip to content

Commit

Permalink
pulled over
Browse files Browse the repository at this point in the history
  • Loading branch information
cziaarm committed Jul 2, 2024
1 parent c18703d commit d3af44f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
8 changes: 3 additions & 5 deletions app/actors/hyrax/actors/file_actor_decorator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ module Actors
# Actions for a file identified by file_set and relation (maps to use predicate)
# @note Spawns asynchronous jobs
module FileActorDecorator

def perform_ingest_file_through_active_fedora(io)
# Skip versioning because versions will be minted by VersionCommitter as necessary during save_characterize_and_record_committer.
# these are files too big to send to S3 w/o Streaming
Expand All @@ -20,16 +19,15 @@ def perform_ingest_file_through_active_fedora(io)
Rails.logger.error("[FileActor] writing to fcrepo #{file_set.id}")
# Skip versioning because versions will be minted by VersionCommitter as necessary during save_characterize_and_record_committer.
Hydra::Works::AddFileToFileSet.call(file_set,
io,
relation,
versioning: false)
io,
relation,
versioning: false)
end
return false unless file_set.save
repository_file = related_file
create_version(repository_file, user)
CharacterizeJob.perform_later(file_set, repository_file.id, pathhint(io))
end

end
end
end
Expand Down
6 changes: 3 additions & 3 deletions app/controllers/hyrax/downloads_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ def send_file_contents
end
if s3_object.exists?
redirect_to s3_object.presigned_url(
:get,
expires_in: 3600,
:get,
expires_in: 3600,
response_content_disposition: "attachment\; filename=#{file.original_name}"
)
return
end
end
# from here on this is effectively `super` if this was a decorator
# from here on this is effectively `super` if this was a decorator
# will fall back to streaming object via fedora
self.status = 200
prepare_file_headers
Expand Down
8 changes: 4 additions & 4 deletions app/models/file_set.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ class FileSet < ActiveFedora::Base
include Ubiquity::UniversalMetadata

property :s3_only,
predicate: ::RDF::URI("https://hykucommons.org/terms/s3_only"),
multiple: false do |index|
index.as :stored_searchable, :facetable
end
predicate: ::RDF::URI("https://hykucommons.org/terms/s3_only"),
multiple: false do |index|
index.as :stored_searchable, :facetable
end

include ::Hyrax::FileSetBehavior
end

0 comments on commit d3af44f

Please sign in to comment.