Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

file upload on frontend using ajax #2428

Closed
bbrandtlv opened this issue Oct 18, 2016 · 7 comments

Comments

@bbrandtlv
Copy link

commented Oct 18, 2016

Expected behavior

should upload file using AJAX.
AJAX needed, but without any external plugins

Actual behavior

Using ajax not working, only regular way (forn_open(), not form_ajax())

Reproduce steps

Not working:
{{ form_ajax( 'onCreateConcert', {files: true }) }}

Send to serve
{{ form_close() }}

Working
{{ form_open({request: 'onCreateConcert', files: true }) }}

Send to serve
{{ form_close() }}

im getting record without file. file_size and content_type both empty.

October build

365

@daftspunk

This comment has been minimized.

Copy link
Member

commented Oct 28, 2016

File uploads do not work with AJAX. Not without complicated XHR implementation, which is not supported by all browsers last time we checked. Try the Responsiv.Uploader plugin as a solution.

@artras

This comment has been minimized.

Copy link

commented Dec 18, 2016

I also need file upload via AJAX... How we can do it?

@bbrandtlv

This comment has been minimized.

Copy link
Author

commented Dec 18, 2016

@artras you cant!
Or without ajax, or use your own function (JS ajax)

@artras

This comment has been minimized.

Copy link

commented Dec 18, 2016

@bbrandtlv Do you use Responsiv.Uploader plugin?

@bbrandtlv

This comment has been minimized.

Copy link
Author

commented Dec 18, 2016

@artras This is another option.

@daftspunk

This comment has been minimized.

Copy link
Member

commented Jul 29, 2017

Note, support has been added for this in Build 420+ (#2857)

@meysammahfouzi

This comment has been minimized.

Copy link
Contributor

commented Feb 21, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.