I
I
Iossarian2019-04-10 13:12:09
Yii
Iossarian, 2019-04-10 13:12:09

How to implement file upload and download in record field in GridView?

Good afternoon. Can you please tell me how to implement this functionality? Let me explain what I need here:
5cadbc7464205681464289.png
In terms of functionality, the user on the page sees entries that are weekly. Selects for which week the entry he needs and to this entry should upload a file (in the database field "file"). And make it possible to download this file. There are no problems with loading a file under standard conditions, but with such functionality in GridView it caused a problem.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2019-04-11
@Iossarian

which are weekly.

this is important, now if it were monthly - everything is different there. What the hell is this spam? Wouldn't it be easier to ask "how to insert an input for uploading files into a GridView row?"
there is an actionColumn for this: https://www.yiiframework.com/doc/api/2.0/yii-grid-... you can put a modal with a loader there, for example. Yes, and you can simply put the form with an input (there is a file - a link to the file, there is no file - here's the form for you). You can insert some kind of widget and load it with ajax. What exactly is the problem?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question