mardi 18 juillet 2017

Laravel 5.4 storage security

I have a form where users can upload their resumes, then our HR gets an email with the attached resume and also there is a dashboard where HR can view the application and download the resume. Currently, I'm saving the resumes in the storage/app/...folder. I was reading about security and I'm worried some people would upload some bad files and that Laravel's mimes validation is not enough. So I decided to upload files to Amazon AWS s3. I was able to upload and download the file except attaching the file in an email. My questions are:

1) Is there a way to attach files from S3 in Laravel mail? (I can't just provide a link in the email to access the files since the uploaded files to S3 are not accessible by public URL, they have to be downloaded)

2) Are there any other validation and safety checks other than checking file extension (ex: mimes:pdf,jpg....)?

3) If you were in my place, how would you tackle this problem?

Thank you



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2vzaRFc
via IFTTT

Aucun commentaire:

Enregistrer un commentaire