I would like to know that if there is any constant value on file service. In my app user will be able to download file from server and i will show which file is offline next time they login. For that i give id to every file and save their info in my local data base.
I was planning to use creation date as constant to know if file or folder matches with my data base file. But when i upload file to under any directory, it is containing folder’s creation date changes. How can i know if it is the same folder?
Backendless rest api gives me only these properties of items:
You may think that i can use name for this kind of comparison but what if user changes name from another app? Is there any way to know if the object is the same object?
There might be a couple solutions, one of them is to store a file with id instead of a real file name and map this id to name that you will show to your user. When user changes the name, you change it in your database, and file has always unique name
Hey Sergey thanks for answering, I have already done that i am saving files with uid but how do i know that if my offline file is same with server file? Every data coming from server can be changed. For example: i created id and creation date for “a.txt” and saved to local . After while user changed file name to “b.txt” from another app. Every thing about “a.txt” has changed. How do i know it is the same file i saved to local?
Hey Sergey again thank you for answering, but if my app was the only app to access storage this would work but if user makes changes from other apps my local wouldn’t know those changes. That’s my point.