Reputation: 201
When I upload a file it goes through to my s3 bucket and is all fine there but for some reason my app doesn't redirect? It just stays on the same page. I had a look at the logs and nothing changes, nor do I get back any key.
Heres my form:
= direct_upload_form_for @uploader do |f|
= f.file_field :text_file
= f.submit
and my controller
def upload
@uploader = Submission.new.text_file
@uploader.success_action_redirect = new_submission_path
end
Upvotes: 2
Views: 229
Reputation: 3490
Instead of setting success_action_redirect
to a relative path, you need to set it to a full url:
def upload
@uploader = Submission.new.text_file
@uploader.success_action_redirect = root_url
end
Upvotes: 3