I created a custom form in a new plugin, i wanna do upload image together. How i do it? I tried copy the avatar upload script but doesn't work.
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Juho Jaakkola@juho.jaakkola
Juho Jaakkola - 0 likes
- Marcelo de Andrade@marceloandrade0201
Marcelo de Andrade - 0 likes
- Tom@Thomasondiba
Tom - 0 likes
- Marcelo de Andrade@marceloandrade0201
Marcelo de Andrade - 0 likes
You must log in to post replies.How do you know it's not working? Do you get some kind of an error? Do any files appear to the data directory? Does the global $_FILES variable get populated in the save action?
I don't get a any error, nothing. No, the files not in directory of uploads. $_Files is empty.
But i missed the 'enctype' => 'multipart/form-data' in elgg_view_form, so i solved this problem.
@Marcelo de Andrade, what is the main purpose for your custom 120px by 120px image form? Is it to allow your users to place ads or advertise on your site?
Yes, @Tom. I created a space for ads in my elgg site and the users can upload a image