This is a complex question, I will try to give a detailed answer:
– If you upload the file using the “Download” post type file management part, it will go to the /uploads/lana-download/
folder, where direct file access is prohibited, so https://lana.codes/wp-content/uploads/lana-download/file.pdf
is not accessible to anyone. So direct file access is disabled (it always works that way).
– You can only download the file via the download permalink, for example https://lana.codes/download/1201/
But knowing the download permalink, there is no limitation. If someone knows the download permalink and sends it to anyone else, they will be able to download it.
If you set the “Download” post type to private in the settings, the post type will not be publicly listed, so the link is not easily accessible publicly.
But if, for example, you want the link to be available only to logged-in users, then that would require development and modification.
If you have any further questions, feel free to contact me.