Dear Support,
I am using the sample of the DBContentProvider to make my application using FileExplorer.
Only difference being that i am not saving the content of the file uploaded in the Database, I am using the FileSystem of the server to store the file physically.
My approach is:
1. I have kept a folder on the server file system (E.g. "C:\ClientFiles"). And i save all the uploaded file in that folder only just by changing the name of the File. The new name is the combination of the ID attribute of the File on the Database and its extension. E.g. If client is uploading an "Folder A\Folder Child\Apple.jpg" file, then i save it as "1.jpg" in the "C:\ClientFiles" folder. If client is uploading an "Folder B\Folder Child\Orange.jpg" file, then i save it as "2.jpg" in the "C:\ClientFiles" folder which is on the FileSystem in the server.
Note: I am storing the Path of the File("C:\ClientFiles\1.jpg","C:\ClientFiles\2.jpg") and thier names ("Orange.jpg", "Apple.jpg") in the Database against their IDs.
2.Now i have tried lots of things trying to show the preview of the file or download the file, but am not succeeding it. I know i need to make changes in the DBContentProvider class. Can you please tell me which all methods in the DBContentProvider class do i need to override to make it work.A sample would be great.
I am using the sample of the DBContentProvider to make my application using FileExplorer.
Only difference being that i am not saving the content of the file uploaded in the Database, I am using the FileSystem of the server to store the file physically.
My approach is:
1. I have kept a folder on the server file system (E.g. "C:\ClientFiles"). And i save all the uploaded file in that folder only just by changing the name of the File. The new name is the combination of the ID attribute of the File on the Database and its extension. E.g. If client is uploading an "Folder A\Folder Child\Apple.jpg" file, then i save it as "1.jpg" in the "C:\ClientFiles" folder. If client is uploading an "Folder B\Folder Child\Orange.jpg" file, then i save it as "2.jpg" in the "C:\ClientFiles" folder which is on the FileSystem in the server.
Note: I am storing the Path of the File("C:\ClientFiles\1.jpg","C:\ClientFiles\2.jpg") and thier names ("Orange.jpg", "Apple.jpg") in the Database against their IDs.
2.Now i have tried lots of things trying to show the preview of the file or download the file, but am not succeeding it. I know i need to make changes in the DBContentProvider class. Can you please tell me which all methods in the DBContentProvider class do i need to override to make it work.A sample would be great.