orionjs / orioncms

[Old] Orion is an open source framework built on Meteor that makes complex as well as simple apps possible with minimal effort.
http://orionjs.org
MIT License
715 stars 129 forks source link

Drag and drop (and/or multi-select) image upload #309

Open vonwao opened 9 years ago

vonwao commented 9 years ago

A user asked me for drag and drop image uploads for Orion collection. I think this would be a great feature. Also I noticed: currently with "images" attribute I can only select one file at a time to upload. I want to take a crack at creating Orion attribute for this feature but may need some assistance. I'm thinking either integrate one of these packages or copy some code:

https://github.com/devonbarrett/meteor-dropzone https://github.com/tomitrescak/meteor-uploads

Any ideas?

jeremyhodges commented 9 years ago

I used the Dropzone package with my latest OrionJS project and upload via the orion.filesystem -- It's a front-end view not an overwrite of any of the admin features though. I had to hack up the DropzoneJS a bit and thing there's probably a much better way to do it. Happy to share what I did though if at all interested.

rwatts3 commented 9 years ago

As for multiple images uploads. Rather than using

orion.attribute('image');;

use

orion.attribute('images');
//and
orion.attribute('files');
nicolaslopezj commented 9 years ago

To enable multiple file upload, Orion filesystem must support multiple file upload

vonwao commented 9 years ago

@jeremyhodges Thank you for sharing this code. I still haven't had a chance to test out this out for my app but it looks very promising.

@rwatts3 I think you misunderstood what I meant, i.e. that you can only select one file a time in the file chooser. Now this may be related to mac OS or chrome, however many other websites allow to multi-selecting files for upload.

@nicolaslopezj Thanks, maybe that's the problem! I didn't occur to me, I will look into it, it sounds like there are multiple filesystem implementations? I didn't have AWS key so I decided to stick with database.

Thanks again!

rwatts3 commented 9 years ago

I see what you mean yes there was a misunderstanding . On Mon, Sep 28, 2015 at 12:34 PM vonwao notifications@github.com wrote:

@jeremyhodges https://github.com/jeremyhodges Thank you for sharing this code. I still haven't had a chance to test out this out for my app but it looks very promising.

@rwatts3 https://github.com/rwatts3 I think you misunderstood what I meant, i.e. that you can only select one file a time in the file chooser. Now this may be related to mac OS or chrome, however many other websites allow to multi-selecting files for upload.

@nicolaslopezj https://github.com/nicolaslopezj Thanks, maybe that's the problem! I didn't occur to me, I will look into it, it sounds like there are multiple filesystem implementations? I didn't have AWS key so I decided to stick with database.

Thanks again!

— Reply to this email directly or view it on GitHub https://github.com/orionjs/orion/issues/309#issuecomment-143852151.