Offer file upload for customer - Possible
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Re: Offer file upload for customer - Possible
Uploaded files are not part of the $_POST variable but in $_FILES which you can access by $view->request()->getUploadedFiles()
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Offer file upload for customer - Possible
you are right, it should be in $_FILES.
Sadly empty.
I think the my main problem is related to "Content-Type"
Basket checkout is always "application/x-www-form-urlencoded; charset=UTF-8".
For file upload it is must be "multipart/form-data;", otherwise it won't work.
I tried to change it in all possible ways, but no luck. It is still sending x-www-form.
Sadly empty.
I think the my main problem is related to "Content-Type"
Basket checkout is always "application/x-www-form-urlencoded; charset=UTF-8".
For file upload it is must be "multipart/form-data;", otherwise it won't work.
I tried to change it in all possible ways, but no luck. It is still sending x-www-form.
Re: Offer file upload for customer - Possible
Did you changed it here?
https://github.com/aimeos/ai-client-htm ... d.php#L141
https://github.com/aimeos/ai-client-htm ... d.php#L141
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Offer file upload for customer - Possible
yes, I did.
Days later in my despair all possible places where "application/x-www-form-urlencoded" found.
no luck.
Days later in my despair all possible places where "application/x-www-form-urlencoded" found.
no luck.
Re: Offer file upload for customer - Possible
Guess, the problem is the XHR request done instead of a normal POST by the browser:
https://github.com/aimeos/ai-client-htm ... s.js#L1284
This example code may help to implement a file upload using jQuery XHR:
https://makitweb.com/how-to-upload-imag ... ry/#jQuery
https://github.com/aimeos/ai-client-htm ... s.js#L1284
This example code may help to implement a file upload using jQuery XHR:
https://makitweb.com/how-to-upload-imag ... ry/#jQuery