This project has moved and is read-only. For the latest updates, please go here.

How to get the images from a folder inside the pictures library?

May 1, 2012 at 10:27 PM


I'm new to sharepoint and I'm working on retrieving urls of images from Pictures Library in my Site collection using GetListItems method in spservices lists webservice.(I'm able to do this ).

How to use the same method for getting the images from a folder in Pictures Library?

Or is there an another better way(method) to retrieve them ?



May 2, 2012 at 1:27 PM

You'll want to flatten your list using the <QueryOptions> parameter.  Something similar to:

"<QueryOptions><ViewAttributes Scope='RecursiveAll' /></QueryOptions>"

You'll add that to the option CAMLQueryOptions within your SPServices call.  That should be all it'll take to make it work.




May 10, 2012 at 4:00 PM

Thanks Matt,It helped a lot. I am wondering  Is it possible to query one folder at a time given that we have the name of the folder?

May 10, 2012 at 8:15 PM

Yes that's possible.  You would modify your CAML query to reflect that.  Don't have the exact syntax handy, but it's doable.  It's not in the QueryOptions FYI, it's in the CAML Query portion.