@coding_field Sensitive files should not be publicly-accessible by filename.
Instead, upload the files to a secure location. Then use some form of URL signing to actually access the files. You can do this is if you use Amazon S3 or CloudFront to serve files.
Your application should only generate signed URLs for files that the currently-authenticated user has access to, i.e. they should not be able to generate a URL to view another user’s ID document.
If you’re dealing with sensitive documents like government-issued IDs then I’d be inclined to encrypt them at rest as well. For example, if your S3 bucket is misconfigured, you then don’t want bad actors to be able to download your bucket’s contents and have access to every ID document uploaded by your application. I’d also imagine a lot of countries will have laws around how sensitive information like IDs are stored and will probably mandate that they are encrypted in storage.
--
@vandan Don’t beg people to award you best answers.