I have a download button in the UI, user clicks on it and download 3 files in a zip format.
It’s not necessary that the files are already there(on the server) when download button is clicked because the backend process can take sometime(30mins to 1 hr) to put the files at a particular location on the server.
Files are going to be in following format in a particular user specific directory.
file1.csv file2.csv file3.csv
I am planning to disable the
Download button until the files are uploaded to the particular directory on the server by the backend process.
My goal is to get the latest files from the location for a particular user. In order to get the latest file I was thinking about following approaches :
file1_UUID.csv file2_UUID.csv file3_UUID.csv
As soon as
Download button is clicked, I am also planning to store the UUID or incrementing integer and
- Generate UUID/OR Incrementing integer on the back end side (Java webservice side) and then keep on checking regularly using a webservice whether file corresponding to the latest UUID/incrementing integer exists on the server or not.
Is creating a table and storing UUID , username etc in a table a good approach?
OR Is generating UUID/Incrementing integer on the webservice a better option rather than generating it on UI side?
Should I really use UUID or an incrementing integer is fine?
Please let me know if I can answer more questions. thanks !
Some of the discussion started in this post but I created a new post since it’s a new question