Friday, January 25, 2013

Re: [Rails] Access Client's File System from Rails application deployed at Heroku (for instance)

On Fri, Jan 25, 2013 at 8:44 PM, sagar p. <lists@ruby-forum.com> wrote:
> Part of the Rails application, I want to let the client keep the
> location string of a video file in the database at Heroku(My plan is to
> deploy the application at Heroku). So, when the client wants to access
> his or her file, the Rails application gets the location string from the
> database and opens the matching local file from his or her computer. Is
> this possible???

You wish to keep the path of a file that exists on the user's local
machine in your database in the cloud, and pass it back to the user?

I cannot begin to see how this would be possible unless your user had
a server running on their localhost that could serve up the file.

Trying to set a URL like `file:///home/username/somefile` cannot work
when you set it in a web page:

<a href="file:///home/username/somefile">somefile</a>

does not work when your web page is being served from elsewhere. Try
it. There are extremely good reasons for this.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate