File List
There are many different blocks that are aimed at loading files. Their data do not save in items_list. There is a separated array for that called file_list. In this chapter we will see what data about files is used in the application.
For each loaded file will be saved all needed data about it.
Name | Type | Description |
---|---|---|
app_id | number |
due to this property, file is saved in the application folder |
extention | string |
saves file extension; used in generating a new name |
file_id | number |
saves generated by the server identification number for file |
file_name | string |
initial file name saves in this property; in the future, it is not used since a new name is generated |
item_id | number |
shows which item this file belongs to |
last_update | number |
shows last time of file update in milliseconds |
url | string |
shows path to the file on the server |
Name Generation
At first, server generates an identification number for file. Then server merges it with the extension and saves as a new file name.
Saving Files On The Server
Let’s look at url. It consists of three parts:
https://gudhub.com/userdata/26503/872421.jpg
Base URL: https://gudhub.com/userdata/
Application ID: 26503
File name created by the server: 872421.jpg