0

Hi I am getting internal server error while uploading file to box.net.

<form id="myForm" method="POST" enctype="multipart/form-data" action="https://upload.box.net/api/1.0/upload/<my_auth__token>/0">
            <input type="text" id="keyword" /><br><br>
            <input type="file" class="upload_file_input"/><br><br>
            <input type="submit" value="Upload"/>
            <input type="button" value="Reset"/>
</form>

I can upload the file from a chrome plugin by doing a post to same url.Can't figure out whats the problem with code.Please help.

The error I get is this :

Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log. 
vishesh
  • 2,007
  • 6
  • 32
  • 67

1 Answers1

0

In your form action URL, you have an auth token placeholder, <my_auth__token>. Perhaps that's never getting swapped out for a real token?

John Hoerr
  • 7,955
  • 2
  • 30
  • 40
  • I am giving the actual auth_token.I have replaced it only in question with – vishesh Oct 13 '12 at 05:42
  • Ok, just ruling out the obvious. :) The [API reference](http://developers.box.net/w/page/12923951/ApiFunction_Upload%20and%20Download) suggests that a few things might be missing from your form, including the character encoding and a name attribute on the element. I don't know if those (and other) things are strictly necessary, but it might be worth a shot. – John Hoerr Oct 13 '12 at 14:07