  def actions
    if params[:media_action] != 'crop_url'
      authorize! :manage, :media
    end
    params[:folder] = params[:folder].gsub("//", "/") if params[:folder].present?
    case params[:media_action]
      when "new_folder"
        params[:folder] = slugify_folder(params[:folder])
        render partial: "render_file_item", locals: {files: [cama_uploader.add_folder(params[:folder])]}
      when "del_folder"
        cama_uploader.delete_folder(params[:folder])
        render inline: ""
      when "del_file"
        cama_uploader.delete_file(params[:folder].gsub("//", "/"))
        render inline: ""
      when 'crop_url'
        unless params[:url].start_with?('data:')
          params[:url] = (params[:url].start_with?('http') ? '' : current_site.the_url(locale: nil)) + params[:url]
        end
        r = cama_tmp_upload( params[:url], formats: params[:formats], name: params[:name])
        unless r[:error].present?
          params[:file_upload] = r[:file_path]
          sett = {remove_source: true}
          sett[:same_name] = true if params[:same_name].present?
          sett[:name] = params[:name] if params[:name].present?
          upload(sett)
        else
          render inline: r[:error]
        end
    end
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.