I guys, I'm facing a brick wall with my code right now. I'm trying to upload "CV" to website but it won't "Save" Anything but pdfs. My controller looks something like this, which is what i think the problem is coming from.
public function getDownloadCV($email, $name) { //PDF file is stored under project/public/download/info.pdf $file = storage_path() . "/app/cv/" . $email . "/" . $name . ""; // dd($file); $headers = array( 'Content-Type: application/pdf', 'Content-Type: application/msword', 'Content-Type: text/files', ); return response()->download($file, 'cv-' . $email . $headers); }
2.1m questions
2.1m answers
60 comments
57.0k users