I am working on a website in which a user can sign in and upload a file and other users can search for it by name and download it. Those files will be catagorized as audio, video, apps(linux, windows, mac), documents etc. So, I was wondering if it is legal or illegal. I'll also add a "report" option with each file by which visitors can report a pirated content.
Building a website where people can share files is not illegal.
If people upload content where the copyright is owned by someone else and they don't have permission to share it, then that is illegal and they are responsible.
If you then share that content, you become responsible.