Pregunta

I am trying to create a portfolio site and am stuck finding a good approach to deal with images. I have integrated the SonataAdmin Bundle and have setup Admin classes for "Projects" and "Images". My goal is to go into a Project and add images to it and select one of these images as the Project thumbnail.

Ideally I would like to integrate an AJAX multi-uploader. I am not sure the best approach for this and am looking for any suggestions / thoughts.

I have looked at the Sonata Media Bundle, though it seems more robust than I actually need and the learning curve to customize it seems a bit steep. I have already setup an image entity (symfony2 cookbook for uploading documents) I imagine I can create a many-to-one on images and projects rather than using the MediaBundle, though I am still at a loss of how to integrate an AJAX script for this.

Thanks in advance for any advice! Shawn

¿Fue útil?

Solución 4

So I endedup using Valumns Ajax multi uploader: http://valums.com/ajax-upload/

I tried to customize the Sonata Admin Page but this proved a bit difficult, Instead I simply created a route / controller / view specifically for uploading batch images. It seems to be working great!

Otros consejos

I suggest you to look at https://github.com/punkave/symfony2-file-uploader-bundle This bundle is based on the excellent blueimp jQuery-File-Upload package and provides multiple file uploads.

Edit 28/04/14: There is now also OneupUploaderBundle which supports a variety of uploaders and seems to be under more active development.

checkout https://github.com/ruian/RuianUploadifyBundle its support multiupload but only with flash plugin.

Also this bundle is worth a shot. Not really mentioning AJAX, but seems really strong in basic uploading features. Once you get that done, you can ajaxify by yourself. I'm planning to try this bundle in few days, I may update this answer later.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top