5

These special instructions for getting SWFupload to work on a mac in safari or firefox are only for PHP. Could some polyglot coders out there, translate this to Rails for me?

PHP Version this quote is from here

I added echo "OK"; to the end of upload.php and uploadphoto.php and my MAC user can use the uploader with Photopost.

I'm assuming their upload.php is the file that hosts the form.. maybe uploadphoto.php is an action in their controller?

Trip
  • 26,756
  • 46
  • 158
  • 277
  • 1
    Actually echo("ok") is equivalent to rails <%="ok"%> from my understanding..dont know if it has any broader meaning in this context.. – rubyprince Mar 03 '11 at 19:01

4 Answers4

13

You don't need a template for this, the controller can render the text itself:

render :text => "OK"
zetetic
  • 47,184
  • 10
  • 111
  • 119
2

The equivalent in Rails is <%= "OK" %> as I have mentioned in the comment. I dont know about SWFUploader stuff.

rubyprince
  • 17,559
  • 11
  • 64
  • 104
1

As far as I understand, you want to use a rails library for uploading files.

Use Paperclip for that, or google for other possible solutions.

And rails equivalent to PHP command echo("ok") would be I guess this code in view: <%= "ok" %>

Nikita Barsukov
  • 2,957
  • 3
  • 32
  • 39
  • 1
    you dont need `puts`. It prints it in the console and you will get `nil` in the browser. use `<%= "ok" %>` – rubyprince Mar 03 '11 at 19:15
0

The equivalent is having your action's view consist of the phrase 'OK'.

pushcx
  • 571
  • 3
  • 12
  • Interesting..I guess I'm just not sure where to place this then. If you've worked with SWFupload before, any ideas? – Trip Mar 03 '11 at 19:00