# File creation in jquery + Rails

**URL:** <https://www.ruby-forum.com/t/file-creation-in-jquery-rails/192435>\
**Category:** Rails\
**Created:** [July 30, 2010, 11:13am UTC](https://www.ruby-forum.com/t/file-creation-in-jquery-rails/192435 "2010-07-30T11:13:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![silver-spoon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/aeb1de/32.png) [@silver-spoon](https://www.ruby-forum.com/u/silver-spoon)\
**Post date:** [July 30, 2010, 11:13am UTC](https://www.ruby-forum.com/t/file-creation-in-jquery-rails/192435/1 "2010-07-30T11:13:34Z")

</div>

I am new to Rails. In my web application, the user can type the  
contents of a file in a textarea or a content Editable iFrame and when  
he saves the file, the contents should be written to the file with the  
file extension specified by the user. How can I do so??

---

<div class="post-metadata">

**Author:** ![silver-spoon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/aeb1de/32.png) [@silver-spoon](https://www.ruby-forum.com/u/silver-spoon)\
**Post date:** [July 30, 2010, 12:03pm UTC](https://www.ruby-forum.com/t/file-creation-in-jquery-rails/192435/2 "2010-07-30T12:03:21Z")

</div>

On 30 July 2010 10:12, Silver S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I am new to Rails. In my web application, the user can type the  
> contents of a file in a textarea or a content Editable iFrame and when  
> he saves the file, the contents should be written to the file with the  
> file extension specified by the user. How can I do so??

Where are you trying to save the file? On the users PC or on the  
server?

Colin

---

<div class="post-metadata">

**Author:** ![silver-spoon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/aeb1de/32.png) [@silver-spoon](https://www.ruby-forum.com/u/silver-spoon)\
**Post date:** [July 30, 2010, 12:27pm UTC](https://www.ruby-forum.com/t/file-creation-in-jquery-rails/192435/3 "2010-07-30T12:27:56Z")

</div>

On the server

---

<div class="post-metadata">

**Author:** ![silver-spoon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/aeb1de/32.png) [@silver-spoon](https://www.ruby-forum.com/u/silver-spoon)\
**Post date:** [July 30, 2010, 1:45pm UTC](https://www.ruby-forum.com/t/file-creation-in-jquery-rails/192435/4 "2010-07-30T13:45:49Z")

</div>

On 30 July 2010 11:26, Jatin kumar [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> On the server

Please don’t top post on this list. Thanks  
Put your text area in a form with a submit button. In the controller  
get the contents from params and write it to the file.

Colin
