-
Notifications
You must be signed in to change notification settings - Fork 1
adding a version
James Van Mil edited this page Sep 18, 2017
·
3 revisions
Find your file set:
file_set = FileSet.find 'PID'
Find your user:
user = User.find(CRITERIA)
Create an actor:
actor = Hyrax::Actors::FileSetActor.new(file_set, user)
Create the file:
file = Hyrax::UploadedFile.create( file: 'PATH_TO_FILE', user_id: user.id)
Update the file:
actor.update_content(file.file)
Done!