Save Physical File using MySQL
-
Hi, I am using MySQL for employee WinForm application. Some tables have images and Ia m currently saving it as blob which is killing the size of the database. I want now to move it to a varchar field contains the file name or ID and save the physical file on the server instead of blob. I want to know what's the best practice in this? Do I need to include FTP server and client in my application? Is it possible to send the file with the database SqlConnection but receive it there in the server as physical file? Please assist.. Thanks, Jassim[^]
Technology News @ www.JassimRahma.com
-
Hi, I am using MySQL for employee WinForm application. Some tables have images and Ia m currently saving it as blob which is killing the size of the database. I want now to move it to a varchar field contains the file name or ID and save the physical file on the server instead of blob. I want to know what's the best practice in this? Do I need to include FTP server and client in my application? Is it possible to send the file with the database SqlConnection but receive it there in the server as physical file? Please assist.. Thanks, Jassim[^]
Technology News @ www.JassimRahma.com
No - the simplest solution is to create an "employee photo" folder on the server, and share it, giving read-only access. Your client apps then read the file name from the DB and access the share directly: Access to remote folder[^]
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
-
No - the simplest solution is to create an "employee photo" folder on the server, and share it, giving read-only access. Your client apps then read the file name from the DB and access the share directly: Access to remote folder[^]
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
but the folder will also have confidential documents such as contracts and warning letters for employee and giving read only access will allow users to view every file stored in it.
Technology News @ www.JassimRahma.com
-
but the folder will also have confidential documents such as contracts and warning letters for employee and giving read only access will allow users to view every file stored in it.
Technology News @ www.JassimRahma.com
You don't give the users the permissions to view the folder by default. Instead, have a server based application or a Web API retrieve the documents and have that with the appropriate permission. Then you back this up with access control for the user against that service.
This space for rent
-
but the folder will also have confidential documents such as contracts and warning letters for employee and giving read only access will allow users to view every file stored in it.
Technology News @ www.JassimRahma.com
Create a folder for specific document types, employee photos, contracts, correspondence etc Or do as POH suggested and create a service, this is the preferred method as it removes the client access directly to the server. However this would require you to reengineer you data access :sigh:
Never underestimate the power of human stupidity RAH