Sha256: 2cfb3b33b0b26dd7c2fafdd75a22614fb2f1edda7f77c2e19baf9df3b7ab43b7

Contents?: true

Size: 598 Bytes

Versions: 15

Compression:

Stored size: 598 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 = 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

15 entries across 15 versions & 1 rubygems

Version Path
hydra-head-3.3.0 app/helpers/hydra/hydra_uploader_helper_behavior.rb
hydra-head-3.2.2 app/helpers/hydra/hydra_uploader_helper_behavior.rb
hydra-head-3.2.1 app/helpers/hydra/hydra_uploader_helper_behavior.rb
hydra-head-3.2.0 app/helpers/hydra/hydra_uploader_helper_behavior.rb
hydra-head-3.2.0.pre3 app/helpers/hydra/hydra_uploader_helper_behavior.rb
hydra-head-3.2.0.pre2 app/helpers/hydra/hydra_uploader_helper_behavior.rb
hydra-head-3.2.0.pre1 app/helpers/hydra/hydra_uploader_helper_behavior.rb
hydra-head-3.1.5 app/helpers/hydra/hydra_uploader_helper_behavior.rb
hydra-head-3.1.4 app/helpers/hydra/hydra_uploader_helper_behavior.rb
hydra-head-3.1.3 app/helpers/hydra/hydra_uploader_helper_behavior.rb
hydra-head-3.1.2 app/helpers/hydra/hydra_uploader_helper_behavior.rb
hydra-head-3.1.1 app/helpers/hydra/hydra_uploader_helper_behavior.rb
hydra-head-3.1.0 app/helpers/hydra/hydra_uploader_helper_behavior.rb
hydra-head-3.1.0.rc2 app/helpers/hydra/hydra_uploader_helper_behavior.rb
hydra-head-3.1.0.rc1 app/helpers/hydra/hydra_uploader_helper_behavior.rb