I have a website where people will come and they will fill the form and after that they will receive links to download dataset files each of them are of 650 MB. I do not want to use hardcoded paths otherwise my form will not be useful and people will start downloading those files through the hard links.
I am not sure how to generate dynamically random link file with such capability to provide files like 650 MB in size.
This is a bit of advanced task but not impossible. First off, start with creating database table with fields: id, file_path, hash, active - After that create Active Record model for this table.
Create action in controller for downloading that requires $hash as parameter, and put following logic there:
download view:
Then, in Your form controller generate md5 hash based on current time and maybe some form fields (just to avoid duplicated hash). And for every link, save new model in database. Finally, render links with hash parameter.