search

Home  >  Q&A  >  body text

java - 七牛怎样解决图片分页查询的问题?

我使用的是七牛Java SDK,目前分页是用的如下代码:

fileListing = bucketManager.listFiles(DEFAULT_BUCKET, UPLOAD_ROOT, marker, 10, null);

其中marker参数是关键,它表示了上一次查询结束的游标。这种原理很类似于NoSQL的组织方式。
那么问题来了:虽然我可以实现查询“下一页”的功能,但是查询“上一页”怎么实现呢?

PHPzPHPz2770 days ago344

reply all(1)I'll reply

  • 迷茫

    迷茫2017-04-17 17:53:54

    Why don’t you consider doing paging in your own project? If you record the key of the image uploaded to Qiniu and save it in the database, wouldn’t it be nice to do the paging yourself?
    Use Qiniu as a simple storage service

    reply
    0
  • Cancelreply