Hello Appery.io Team!
my app already can Upload and Retrieving files from DB (File API),
but I can't find a solution how to Retrieving ALL fileNames for specifc user(owner) in DB (Files Built-in collection).
Can you help me?
Regards
Hello Appery.io Team!
my app already can Upload and Retrieving files from DB (File API),
but I can't find a solution how to Retrieving ALL fileNames for specifc user(owner) in DB (Files Built-in collection).
Can you help me?
Regards
Hi,
I'll look for a solution.
Take a look at $in in where clause please.
You can send request to DB and set in "where" something like this:
code{"user_id": {"$in": ["fileName"]}}/code
Thank you for reply, but I can't access files stored in database in this way (this is my fault?), in appery.io docs (Database - File Api) tell me to retrieve file with file name only.
----doc-----
Retrieving Files
curl -X GET
-H "Content-Type: [set_to_file_type]"
-H "X-Appery-Database-Id: 498ad4r0e4b9348a121cf6ea"
-H "X-Appery-Session-Token: 900ad7b0e4b9808a456cf5ba"
]https://api.appery.io/rest/1/db/files...
----end doc-----
In my case, I need retrieve a list of files, I don't know the name, I want retrieve all files.
Can I use all OBJECT API to access Files stored in Database? Any sample?
Thanks again
I've tried,and give up.
I cant query https://api.appery.io/rest/1/db/files
Without file name, but when I don't know name Files, what can I do?
Helo Helsen! Sorry for late respond. We'll check and let you know.
As I said, I use Files (built-in collection - like users built-in collection) it's not customized collection.
Result:
Code: Select all
codeDBSQ203/code
Collection 'files' absent in database with id 'xxxxxxxxxxxxxxxx'.I need to create a workaround because not have solution for my question.
1- create a collection files_custom (for add to default File Built-in collection)
2- create column file_url
3- create column file_name
4- upload file with File API (database) http://docs.appery.io/documentation/b...
5- get result file url and file name to local storage
6- insert data in collection files_custom
7- now I can make query to get all files urls and filenames
but is very poor method to do simple thing....
Helsen, we'll test it and inform you asap.