我使用的是七牛Java SDK,目前分页是用的如下代码:
fileListing = bucketManager.listFiles(DEFAULT_BUCKET, UPLOAD_ROOT, marker, 10, null);
其中marker参数是关键,它表示了上一次查询结束的游标。这种原理很类似于NoSQL的组织方式。那么问题来了:虽然我可以实现查询“下一页”的功能,但是查询“上一页”怎么实现呢?
学习是最好的投资!
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
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