Hello Andreas,
i have implemented the DBFiles api and i was able to add files. Working with the files api, i encountered a few problems (maybe bugs):
1. When i delete a file with the DBFiles Api, only the entry inside the "files" database table is deleted, but not the data of that file inside "files_data"
-> Do i need to delete it by my own??? Or is this an intentional behavior (delete the reference but keep the data in database)? Doesn't that clutter up the database?
2. Trying to access the file via browser, using the path with session key, downloads the file, but the name of the file is corrupted (the name consists of hyroglyphs only + the extension) and the length of the file is 0 bytes. I was not able to download/access a valid file from browser (although the database entries all look good, i can see that the correct file name was written to the db). Can you think of a reason why this behavior occurs?
3. From the 10th file I add, I get wrong information returned from DBFilesList, please see the 9th and 10th output of DBFilesListResult:
"
: [test.txt], [/shareinno/myfiles/22/test.txt?key=39fb6cbabc36555cc5d1ed830b1551168e3acb30676f5e08c8627f15e7038922] mediarunway-shareinno.js:79:38
: [test.txt], [/shareinno/myfiles/24/test.txt?key=39fb6cbabc36555cc5d1ed83{"src":"src1","mt":"DbFilesListResult","]
"
-> The path/message returned is corrupted
Adding a 11th entry then leads to an error (inside browser trying to show the DBFilesListResult)
"
Uncaught SyntaxError: JSON.parse: unexpected character at line 1 column 1476 of the JSON data
onmessage https://dev-apps.mr-uc.de/shareinno/13C258/web1/appwebsocket/innovaphone.appwebsocket.Connection.js:83
connect https://dev-apps.mr-uc.de/shareinno/13C258/web1/appwebsocket/innovaphone.appwebsocket.Connection.js:255
Connection https://dev-apps.mr-uc.de/shareinno/13C258/web1/appwebsocket/innovaphone.appwebsocket.Connection.js:428
"
-> What means, i can only handle 9 files per folder. Or is this an intentional behavior???
4. Am i right, that the session key of the stored files path changes every time i close and reopen the app? That means if i send the path/link to somebody for download, and close/reopen my app instance, the send link becomes useless? This would mean, i need my own WebServer logic and internal name/path handling to make the access of the file permanent (or to restrict it).
Tomorrow I will check a few things again, not that I missed something.
Best regards
Mladen Topic