Sha256: 946db7167460806f053b8f1aed2c6ef04d4fa6f49481d445dd587621f31b22d1
Contents?: true
Size: 604 Bytes
Versions: 9
Compression:
Stored size: 604 Bytes
Contents
module Hydra::HydraUploaderHelperBehavior # Generate the appropriate url for posting uploads to # Uses the +container_id+ method to figure out what container uploads should go into def upload_url upload_url = hydra_asset_file_assets_path(:asset_id=>container_id) end # The id of the container that uploads should be posted into # If params[:container_id] is not set, it uses params[:id] (assumes that you're uploading items into the current object) def container_id if !params[:asset_id].nil? return params[:asset_id] else return params[:id] end end end
Version data entries
9 entries across 9 versions & 1 rubygems