Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 751035
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T14:37:12+00:00 2026-05-14T14:37:12+00:00

As I am using Ruby on Rails to build an application, which only runs

  • 0

As I am using Ruby on Rails to build an application, which only runs locally, I am lost in the woods (a nuby without a compass). I have a simple MVC application and my view is missing one thing I could really use. I want to select a local file just to retrieve it’s filename. I know it’s relatively easy to use the form tag helpers for uploading:

<%= file_field 'upload', 'datafile' %></p>

I wonder how I could get the filename from the selected file, without uploading the file.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T14:37:12+00:00Added an answer on May 14, 2026 at 2:37 pm

    You could use jquery. Just do something like

    var name = $('my_input_id').val();
    alert(name);
    

    if you have to pass the name to your application you could just use jquery post to your controller. Your controller should be able to understand the format js (hint: respond_to).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have build a standard Rails 3 application (using Ruby 1.9.2). I placed all
I have built a very simple blog application using Ruby on Rails. New to
I'm using Ruby on Rails to develop a web application. I have a wiki
I have built a blog application using Ruby on Rails. In the application I
I have an Ruby on Rails 3 Heroku application, which needs to perform text
I am trying to build a free web application using ruby/rails It should be
I am build a real time web application using Ruby on Rails and Heroku
I have developed a Ruby on Rails application and successfully deployed on Weblogic using
Our team have built a web application using Ruby on Rails. It currently doesn't
I'm trying to build a web service using Ruby on Rails. Users authenticate themselves

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.