I've got an Assets field in a Matrix. I can upload to S3 and Local upload directories while in the CP. When I try to upload to either S3 or local directories in my Channel Form page, I get the following error message:

"Could not upload the file - server returned an unexpected response. Please check the server settings".

If I replace the Assets field with a EE File fieldtype, it works fine, but we'd prefer to be using S3, hence the love for Assets.

*I haven't tried just a stand alone Assets field instead of a field in a matrix, but I don't think that will fix the problem.

  • Can you check the AJAX response body you get when uploading the file in Channel Form? The message you're getting happens if you get anything other than the expected JSON. Jan 9, 2014 at 18:49
  • It seems that the response I'm getting is my 404 page, which leads me to believe that it has to do with my .htaccess index.php removal. Are there any special tricks you've come across I should look out for?
    – AJP
    Jan 10, 2014 at 2:09
  • The usual solution is "don't perform any rewrites, if that's a POST request". Doing a 301 redirect with .htaccess drops all POST data. Also, you might need to set assets_site_url config setting (docs.pixelandtonic.com/assets/using/config.html) Jan 10, 2014 at 7:15
  • 1
    Ok, setting the "assets_site_url" fixed my uploading issue locally. I'll test it on the dev server and let you know.
    – AJP
    Jan 10, 2014 at 13:59

1 Answer 1


It turned out that the fix mentioned above only fixed in my local install. The issue was in the actual PDF file itself. I was able to turn of XSS detection on uploaded files for the time being, and it fixed my issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.