Anybody knows an example tutorial, how to upload multiple files (unlimited quantity) with paperclip & Rails 3.1? All examples I've seen are uploading fixed files count per one upload.
I am also looking for it. I found this page:
https://github.com/blueimp/jQuery-File-Upload/
There is a demo over there. It is not based on paperclip, it seems, but then I also found this one:
https://github.com/tors/jquery-fileupload-rails
Which has a linked repository with an example with paperclip:
https://github.com/tors/jquery-fileupload-rails-paperclip-example
Maybe this one can get us in the right direction!
Good luck!
Related
I'm currently working on profile images for my registered users.
As of now my users can upload their own images to use and of course there's a default image, incase users don't upload a picture.
By the way, I'm using the Paperclip gem.
I've been trying to do so that my users can choose to select an image from a list of images, provided by the website/database.
This website: https://satwcomic.com/ has exactly what I'm looking for.
Example from the website.
I've been trying to find a solution for this for the past month, but without luck. any hints on how i could successfully achieve such feature with or without paperclip?
I'm hoping to get pushed in the right direction.
Please do keep in mind, I'm still learning Ruby on Rails as a student and any help will be appriciated.
I'm struggling to generate a dynamic sitemap for SEO purposes in a Wicket 1.5 application. I looked at this example but couldn't understand what they mean exactly.
I see I need to create an xml page and mount it but then it talks about generating the url list. How do I do this part? Is there functionality in Wicket to get a list of mounted pages? According to that link, it's "very easy" to do this in Wicket 1.5 so I must be missing something obvious.
Any tips or pointers gratefully appreciated! Thanks.
i did exactly this in 2010. there was a wicketstuff-minis project for this.
it could be possible it still works if you dig it out of the archives.
http://mvnrepository.com/artifact/org.wicketstuff/sitemap-xml
the sources must also be somewhere out there..
this was built for wicket 1.4 but i guess they changed enough to make it no longer work.
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
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.
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!
What is the best way to achieve ajax file uploads in Rails. I did alot of research, did some testing with remote forms and searched for some jquery plugins. All the plugins i found seemed outdated and i don't know which one will play nice with rails 3.x. Do you guys have any advice on this topic?
Thanks
AFAIK you'll have to be browser specific at the moment. The various browsers are implementing file APIs that allow javascript to read files from the machine. Previously, there was no real way to achieve AJAX file uploading (I think it was for security reasons, but I'm not sure on all the details). I've implemented drag/drop AJAX file uploading before; I can't remember the exact details, but here are some of the resources I used. If I get a chance, I'll see if I can find my code and how I implemented it.
http://demo.tutorialzine.com/2011/09/html5-file-upload-jquery-php
http://www.skuunk.com/2011/04/reading-ajax-xhr-file-uploads-in.html
http://www.centurion-project.org/articles/html5-multiple-file-upload-with-progress-bar
https://developer.mozilla.org/en/Using_files_from_web_applications (best - Mozilla docs)
The Mozilla docs are very useful and got me most of the way there.
I have a requirement of bulk uploading images. More precisely, I want to upload all the images for a web site (static images like back ground, logo, corner images , images required by css etc..)
As I think uploading these images one after another is not looks like quite practical (As it might have 60-70 images). So my questions are..
What is the standard way of doing these kind of a staff ?
Is it possible to let users to upload a .zip (images) file and
extract it from the server side.
If 2 is possible, can i do it with Rails3 and standard shared host
thanks in advance
cheers
sameera
1) Assuming you are talking about allowing bulk uploads from the website not as a rake task the typical way for handling multiple uploads is to use Uploadify / SWFUpload for the frontend along with a gem such as Paperclip to handle the images on the Rails side.
A google search for "paperclip uploadify" or "paperclip swfupload" should give you some good reference material.
2) It is certainly possible to do this, I've mostly worked with it the other way around to offer zipped archives of files for download but processing zips and working with the included files is definitely do-able
3) The suggested methods I gave for (1) above work just fine on Rails 3 and I can't see any reason they wouldn't work on shared hosting. That approach will however need some additional work for environments such as Heroku which have no or transient direct storage