php - Universal multiple file uploader for Laravel 5 -


i want create universal multiple file uploader, don't know approach should choose develop it.

i have attachment model , attachments table in database. have model item , table items. these 2 connected via item_attachment table (maybe morph connection in future, many models can have attachments).

i thought several approaches (examples create form item):

  • use js uploader (like dropzone) , develop separate controller handle uploads (attachmentscontroller). when upload files, controller return json response id's js, , inserted form hidden elements. after submitting form, attached item.

  • don't use js, , process uploads directly in itemscontroller.

  • don't use js, develop service, uploads handled , call it's methods in itemscontroller.

what can recommend? maybe have approach?

thanks


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -