madala's avatar

file upload

Can we insert the documents directly in to the database using laravel without storing the documents in server if possible can you provide any reference.

0 likes
11 replies
jlrdw's avatar

If you are referring to pdf or docx just store the reference. And in the view have a link to the document.

jlrdw's avatar

@mrabbani I think OP doesn't want them on server. Probably just a link to them. But I could be wrong.

madala's avatar

@tykus_ikus

we need to store the documents like pdf,text directly in to the database.

jlrdw's avatar

@madala even though it's possible, in the long run you are better off just having a link to them like most people do images.

madala's avatar

@lrdw i don't want to store the link, i want to store only the exact pdf file.

madala's avatar

@jlrdw we store images in laravel public directory and we just save name of the file in database.

Please or to participate in this conversation.