Fetch S3 Files in FetchSpec like Fashion


#1

Can I fetch S3 Files using a FetchSpec like interaction? The only method I’m familiar with is S3.listFiles() and the FileOperationSpec only documents a limit argument. I’m looking to list files in a UI KendoGrid, but this typically relies on arguments like limit, order, and offset, that are available with .fetch()


#2

S3.listFilesStream().limit().offset().collect()
I think sort or order is there on streams. please always use streams.


#3

@garrynigel

What version of server is this? I’m on 7.8.2.397 and S3.listFilesStream().limit() is not valid


#4

Oops. I made a mistake, Maybe it’s not exposed through JS type system.
So lets see as for your work around the order from filesystem is always of full urlOrEncoded path
you might have to use marker instead of offset.
Not exactly sure what the extent of the use case is, but if you need a Persistable type to use UI Kendo grid to rely on FetchSpec, you might need some type to store the file metadata something like SourceFile which syncs metadata of files in Persistable type on which you can apply FetchSpec. SourceFile does need the Source type and SourceCollection etc because it represents sources as file and you might not be able to use it out of the box directly.