wenzhixin / bootstrap-table-examples

Bootstrap table examples
https://examples.bootstrap-table.com/
MIT License
2.24k stars 1.62k forks source link

I need to save the download log on the web server. Help me... #445

Closed gdrh123 closed 2 years ago

gdrh123 commented 2 years ago

Please read: https://github.com/wenzhixin/bootstrap-table/blob/develop/CONTRIBUTING.md#bug-reports and post issue to: https://github.com/wenzhixin/bootstrap-table/issues, thanks!

halo. I need to save the download log(nginx log) on the web server. Help me... image

When you download the inquired content into json, xml, csv, txt, etc., i must save a log on the server.

What should I do? Please help me.

wenzhixin commented 2 years ago

Sorry, the export plugin does not support to download nginx log.

UtechtDustin commented 2 years ago

@wenzhixin i guess you misunderstood the question. He don't want do download the nginx logs, he have to log the exports (e.g. log which user downloaded a export).

@gdrh123 You can use the exportedSaved Event and within that event you can submit a ajaxrequest to your backend.

gdrh123 commented 2 years ago

@wenzhixin i guess you misunderstood the question. He don't want do download the nginx logs, he have to log the exports (e.g. log which user downloaded a export).

@gdrh123 You can use the exportedSaved Event and within that event you can submit a ajaxrequest to your backend.

@wenzhixin Yes, you're right.:)

gdrh123 commented 2 years ago

Can you help me "ajax request" about "exportedsaved event" samples. I am beginner and ..Very difficult ...,..help..me.. @UtechtDustin

            exportOptions: {
                ignoreColumn: [0],
                fileName: 'downloadlog'  
            }

I know "export Options". What should I do with "onExport Saved"?

UtechtDustin commented 2 years ago

The exportOptions is for the export plugin not for the bootstrap-table. You have to use the onExportSaved Event. Example: https://live.bootstrap-table.com/code/UtechtDustin/9607

gdrh123 commented 2 years ago

@UtechtDustin very thanks!!!! :)