def download
      @uploaded_file = UploadedFile.where(title: params[:title]).first
      unless @uploaded_file
        raise ActiveRecord::RecordNotFound, "Could not find file '#{params[:title]}'"
      end
      redirect_to @uploaded_file.file_url
    end
def download
      @uploaded_file = UploadedFile.where(title: params[:title]).first
      unless @uploaded_file
        raise ActiveRecord::RecordNotFound, "Could not find file '#{params[:title]}'"
      end
      redirect_to @uploaded_file.file_url
    end
GET /uploaded_files/1/download