-
Junior Member
How to store a File in Database?
How to store a file in database. for example if i am upload one resume in database the path will be stored but the information i can't see. any one can please solve this problem?
Note :This is the question asked by a vistor visitro Rajeswari. I am posting this in proper forum.
Last edited by admin; 11-28-2006 at 07:20 AM.
-
Contributing Member
Re: How to store a File in Databes?
Try to store the file in a column with the data type of BLOB OR CLOB ....
-------------------
suresh
-
Junior Member
Re: How to store a File in Databes?
you want to store actual data from the file or just the file path???
if u r storing data then prob. it will increase size of d db.
instead i'll sugest u to follow these steps (to store only path)
1.ask user to select the file to be uploaded
2.copy that file to your application directory(created only to store d uploaded files)
3.rename the file depending upon d username (u can us ur logic)
4.now store this new path (appdir/filename.ext)to the db.
now u can easily show content of uploaded file from appdir/filename.ext
Note : u must rename d uploaded file to avoid overwriting prob.
consider i m uploading a.txt and 2mrow u r uploading a.txt then in this case u will be overwritting my file.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules