Android-FilePicker icon indicating copy to clipboard operation
Android-FilePicker copied to clipboard

showGifs(false) method does not avoid from picking gif files

Open kamikatze2008 opened this issue 7 years ago • 4 comments

Even if I use showGifs(false); method I still can pick gif files. Could you please fix this?

kamikatze2008 avatar Mar 12 '18 14:03 kamikatze2008

Are you sure? Because I am not able to see any gifs if I disabled it in the app sample.

DroidNinja avatar Mar 24 '18 11:03 DroidNinja

Yes, it disables only recently added gifs. But if gifs are present in storage and there are also lots of files that were added after that gif file - it would be seen. It was checked on Huawei P5 and Nexus 5X

kamikatze2008 avatar Mar 24 '18 12:03 kamikatze2008

Can you check their paths? Actually filepicker use below code to check gifs:

if (path != null && path.toLowerCase().endsWith("gif")) {
          if (PickerManager.getInstance().isShowGif()) {
            photoDirectory.addPhoto(imageId, fileName, path, mediaType);
          }
        } else {
          photoDirectory.addPhoto(imageId, fileName, path, mediaType);
        }

DroidNinja avatar Mar 24 '18 12:03 DroidNinja

yes it's path ends with ".gif" but it is still shown, don't know why, it skips this check if user has to swipe down to see gif files

kamikatze2008 avatar Mar 24 '18 20:03 kamikatze2008