BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
Hello, I would like to know how I can add a column that allows uploading multimedia files and how to save the file in a specific path, and store said path in the database.
The following image is how my grid is currently, to add a column of media content.
The following image is an example of the button to add.
The columns grid is declared as follows:
Hi Santy,
Thanks for your update.
You can try to implement the EJ2 Uploader in the Grid component from your side. Please let us know if you face any difficulties while achieving it.
If you want to show the file uploader on each row, you achieve it throw columnTemplate feature of Grid,
columnTemplate: https://ej2.syncfusion.com/documentation/grid/columns/column-template/
Sample Demos: https://ej2.syncfusion.com/demos/#/material/grid/column-template.html
Uploader component documentation: https://ej2.syncfusion.com/documentation/uploader/getting-started/
Also, Refer to the below documentation for more information,
Implement file Uploader on Editing a Grid row: https://www.syncfusion.com/kb/12693/how-to-edit-the-column-in-grid-using-the-uploader-control
Regards,
Rajapandiyan S
Thank you very much for your answer, it helped me a lot.
Now I have a question, how can I get the directory of my file once I select it?
Next, I show the code on which I am basing myself. I understand that in these variables, there is the metadata of the media file that I select, but I can't locate the path (on my computer) where it was in the file when it was selected.
var file = args.file.rawFile;
var reader = new FileReader();
Santy,
You cannot get the selected file path in both client side and server side due to security reasons. Refer to the following common links for more information.
https://stackoverflow.com/questions/53759070/how-to-get-path-directory-from-filereader