singhangadin / android-filepicker

Selecting directories/files made a lot easier.
Apache License 2.0
651 stars 139 forks source link

How can we set the required file extension in this lib? #63

Closed mkamals1989 closed 7 years ago

mkamals1989 commented 7 years ago

Hi,

I want to know can we set only the required file format in this lib. I want to pick only images,pdf, doc and txt file so users cannot see other files.

I came across extension field in DialogProperties, can i set the extension in the below format? DialogProperties properties = new DialogProperties(); properties.selection_mode = DialogConfigs.SINGLE_MODE; properties.selection_type = DialogConfigs.FILE_SELECT; properties.root = new File(DialogConfigs.DEFAULT_DIR); properties.error_dir = new File(DialogConfigs.DEFAULT_DIR); properties.offset = new File(DialogConfigs.DEFAULT_DIR); properties.extensions = new String[]{"pdf", "txt", "doc", "image"};

Thanks & Regards, Kamal S

singhangadin commented 7 years ago

Library doesn't support mime types by now, you have to individually specify all the extensions.

mkamals1989 commented 7 years ago

Ok, I am asking how to specify the extension?