You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
jcoyne edited this page Oct 26, 2012
·
4 revisions
See the "Rails Guides" for the basics of file uploads.
file=params[:file_data]# An instance of Rack::Multipart::UploadedFilefile_asset=FileAsset.newfile_asset.add_file_datastream(file,:label=>file.original_filename,:mimeType=>file.content_type,:dsid=>'content')#the model instance (extending ActiveFedora::Base) you want to attach the file to.file_asset.container=@holding_assetfile_asset.save