I have made an iOS application using built.io. There are several files uploaded in the application. However, i am unable to get the list of all the files uploaded in the app. Could anyone please help?
-
1where have you saved file ? – Jan 21 '15 at 12:24
-
You could always use a network analyzer like Charlec Proxy, Wire Shark or any of others available for download. – zaph Jan 21 '15 at 12:31
-
I have created an application using built.io (it's an MBaaS provider). In my application, users upload their files and attach it to objects. I am unable to get this list of all the uploads in the SDK. It is not related to sniffing the network. – Darren Daves Jan 21 '15 at 13:16
3 Answers
This can be done via BuiltFile class instance method fetchAllOnSuccess:onError:
It returns all files uploaded in your built application only if the requesting user has permission for it.
Built* builtfileObj = [Built file];
[builtfileObj fetchAllOnSuccess:^(NSArray *allFiles) {
// allFiles contains array of BuiltFiles
} onError:^(NSError *error) {
// there was an error in creating the object
// error.userinfo contains more details regarding the same
}];

- 5,631
- 4
- 31
- 59
-
Thanks Rohit. This solved my issue. Your answer was helpful. Thanks again. – Darren Daves Jan 27 '15 at 10:34
To fetch all the uploads, the iOS SDK provides an instance method in the BuiltFile class. It returns an array of all the uploads. Here's the link to the official documentation http://static.built.io/downloads/sdk-docs/ios-docs/Classes/BuiltFile.html#//api/name/fetchAllOnSuccess:onError:

- 1,647
- 2
- 17
- 35
I dont know if its available in the iOS SDK but you can use the REST API to fetch it
Headers :
"application_uid: uid"
"application_api_key: api_key"
URL: GET : https://manage.built.io/v1/uploads?skip=0&limit=50&include_count=true
Params : skip and limit for pagination and include_count is for getting the total count.
The above url will fetch all types of files
But if you want only images or videos then you can use the below urls
https://manage.built.io/v1/uploads/images
https://manage.built.io/v1/uploads/videos
I hope i was helpful to you!!
Note : without the headers the API wont work

- 1,360
- 6
- 16