Hello last video we successfully upload a file to the file system. As you can see here, we upload it to file. It is uploaded here on PDF one GB. So in this video I need to download this file. So here is the table employee table. Let us add a new column.
This column will have a link to download the file. So I will create here. Cool. We can we'll just call them the first one and this column I will insert inside this column link Key and this link, I add here of icon called download we can use this download I could I add here images on Download so we can use this icon for download and we can remove the tickets and this column will be aligned to be center to center the icon and we can make the width of this to be 50 it will see, okay, so just record it here a link and it wants to the user presses this link should they lose a file. So it's this link you should add if he says You don't know what actions we should add fine file download action this key This is the folder action listener and this is our method.
So in this our method, you will select your bean and you will find here they will load doc This is a method I have created. I will go to the bean and I will show it to you. So this is our document and if you want to download the filename, which already exists in St. Louis, Doc so you can take MB Louis, Doc exhibition Reutimann we took and we can add it here as a file name blue I need only this link to be available if there is a value in the MB Louis. Otherwise I don't want to see it. So is a link here in the rental property, it will be in there only if an employee does not equal to null. If it is not null, make it render.
Otherwise disable it we don't want to see it to see it hide it. Okay, so this is just the condition I add is our interoperability said if a road is not equal to null, it make it render so that the user will be able to download the file. And in a beat here, I add a function call that will load document. This function will get the current roles employee and it will get a bill with the current file name and it will go to this post and distort the windows offer. So, actually this download function and maybe upload as well should be in some specific place in a common place and you can call it from anywhere in your PDF. So it does now try to run and this system will route okay so as you can see here that will load icons is appear only in zero which has in between.
So, let us now try to press on this no load you will find the PDF is downloaded here and you can open the file this is so loose also one tool to load here and you can open the file like this. So, this is how you can upload and download if you select any Other role let us try to upload Okay, we beat this and you'll find icons appear. Here you can start for download it likes sources This is how you can upload and download file into the file system. So from this video on the previous video, you're now able to upload and download files from the below location database or from the file system because if you are able to jump before another feature so see you in the considered you