D
D
dkrylov2017-05-29 12:29:02
MySQL
dkrylov, 2017-05-29 12:29:02

How to save many photos at the same time yii2?

Hello!
Please tell me how to implement such a task in yii2:
There is a product, table `product`: id | name
There is a product photo table `product_photo` id | product_id | image The
product is edited in a separate step from the photo. Photos are displayed all on one page, and with the help of drag & drop, you can change the sorting of photos. How to save all this? I can’t imagine at all)
Ie . you need to somehow send a list of photos, and taking into account new, old, marked for deletion PLUS with sorting. And process it in the model

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Fedorov, 2017-05-29
@qonand

Those. you need to somehow send a list of photos, and taking into account new, old, marked for deletion PLUS with sorting.

Form these lists on the client side, and then create the request itself based on them - send it to the server side and parse it. Nothing more specific can be said. it is not clear how this page is arranged for you and with what tools

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question