slack icon indicating copy to clipboard operation
slack copied to clipboard

Only returns 100 files at a time

Open ianhouser opened this issue 8 years ago • 5 comments

If I delete 5, it will show that I have 95 files until I refresh, then I "Have 100 files" again. My team has a total of 1200 files and I'd like to go to the end of the list and work my way to the newer files.

ianhouser avatar Jul 14 '16 22:07 ianhouser

If no argument is passed 100 is default. So by adding

count: 1500

to the request params I got it to show more results on my own instance. See "Count" in the files.list documentation. Ideally there'd be an option to select how many results to return.

ianhouser avatar Jul 15 '16 19:07 ianhouser

For future reference, the count argument goes in the data of the fetchFiles function in /assets/scripts/actions/index.js

After playing with this, I was unsuccessful getting count responses higher than 1000--these requests defaulted to 100, In other words, adjusting the count doesn't help with 1000+ images. A better approach would be to paginate the responses. The server response and the API requests allow for viewing as pages, but pagination controls would need to be incorporated into the interface.

haroldkyle avatar Aug 03 '16 14:08 haroldkyle

Looks like @emilyytlin has solved this and issue #9 as well: https://github.com/emilyytlin/slack/tree/d

Looks awesome, would be great if she submitted a PR :confetti_ball:

JarrettR avatar May 03 '17 21:05 JarrettR

Hi I made a PR. @drewminns please respawn.

linbarbell avatar Aug 21 '17 19:08 linbarbell

Ah, glad somebody else has already discovered and fixed this issue! Didn't realise i had to keep going back and clicking "Get Files" again in order to clear out the months of images.

budda avatar Sep 11 '17 10:09 budda