silexlabs / cloud-explorer

*this version is deprecated, see CloudExplorer2* File manager for your users cloud services such as dropbox, google drive and FTP
http://cloud-explorer.org
52 stars 23 forks source link

missing in CE: choose a folder in CE #20

Closed lexoyo closed 10 years ago

zabojad commented 10 years ago

Alex, can you describe this use case please ?

zabojad commented 10 years ago

Alex, the pick() API doesn't seem to allow folder selecting, does it ? How did you do when you were using file picker with Silex ?

https://developers.inkfilepicker.com/docs/web/#pick

lexoyo commented 10 years ago

Oups sorry for the delay I used to ask the user to select a file in the directory he would have selected I will use the new { folders: true } option to test it in Silex

lexoyo commented 10 years ago

I tried but it does not work :( It is live here http://preprod.silex.me/silex/ All it does is open the file picker normally. To reproduce: "file" then "settings" then the browse button "...". There CE is opened with pick({ folders: true }, successCb, errCb)

zabojad commented 10 years ago

Yes, it's normal, I've removed it in the haxe version since it's not in the Ink File Picker API / specs :(...

I see you really need it so I'll add it again but I do not like to diverge from our initial API / specs... However, I do not see any other solution here...

By the way, in which scenarii do you need to select/pick a folder ?

zabojad commented 10 years ago

OK, I've just added it on the repo... By the way, I also implemented mime types / extensions filtering:

You can now do this:

pick({ mimetype: "image/jpeg" }, successCb, errCb);
// or
pick({ mimetypes: ["image/jpeg", "image/png"] }, successCb, errCb);
// or
pick({ extension: "jpg" }, successCb, errCb);
// or
pick({ extensions: ["jpg", "png"] }, successCb, errCb);

For folder picking, do this:

pick({ mimetype: "text/directory" }, successCb, errCb);

And forget about pick({ folders: true }, successCb, errCb).

lexoyo commented 10 years ago

Cool, thx!!

By the way, in which scenarii do you need to select/pick a folder ?

When the user opens the publish settings, he is able to choose the folder to which Silex publishes the website

zabojad commented 10 years ago

OK, ... please confirm the issue is fixed once you've tested it...

Also, note that this feature (pick filtering) will see some improvements later for example: Ink allows to do this: pick({ mimetype: "image/*" }, successCb, errCb);. That's not yet possible in CE but it will be ^^...

zabojad commented 10 years ago

Closing this for now as we can select directories now. Please reopen if needed.