Skip to content
Snippets Groups Projects
Commit 1d064556 authored by Mauricio Giacomini Girardello's avatar Mauricio Giacomini Girardello
Browse files

small fix

parent 4060190f
No related branches found
No related tags found
No related merge requests found
......@@ -14,13 +14,18 @@ class LearningObjectPublisher
end
def post(learning_object, media_path)
DspaceUploadWorker.perform_async learning_object.id, learning_object.id_dspace, media_path
DspaceUploadWorker.perform_async learning_object.id_dspace, media_path
end
def publish(learning_object)
# change status
learning_object.status = 'active'
learning_object_repository.update_property(learning_object, 'status', learning_object.status)
# update bitstreams from attachments
#if !learning_object.attachments.nil?#
#
# end
end
private
......
......@@ -3,7 +3,7 @@ class DspaceUploadWorker
@@dspace= nil
def perform(learning_object_id, item_id, media_path)
def perform(item_id, media_path)
file = File.new(media_path, 'r')
bitstream = dspace.items.add_bitstream(file, id: item_id, name: File.basename(media_path), description: 'beta upload')
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment