I try to use this code to download files from my database, however, when I try to open the file, I get following errors:
when downloading file type 'docx':
Word documents are stored with the type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' (not visible on the screenshot). I believe this is correct
I solved the bug when trying a bit different code: Downloading jpg,doc,ppt files with php are corrupted