MySQL / PHP file upload?
Moderator: General Moderators
MySQL / PHP file upload?
Hello,
I am looking for a way to sucessfully upload physical documents (to include MSWord,MSExcel,etc..) to a MySQL db.
I've read a bit, and executed some code to upload the file(s) however it dumps the content into a BLOB filed type in MySQL and the content is destroyed if it's not a plain text file.
What I'm trying to acomplish here is my own way of document management/sharing amoung different organizations in my company and allow a "one stop shop" for putting/retreiving all related documents to a specific project. Also with that, I'll store the las time the file was upload; by whom, etc.. as well as the last download time, etc...
Anyone know if this is possible?
Thank you very much!
I am looking for a way to sucessfully upload physical documents (to include MSWord,MSExcel,etc..) to a MySQL db.
I've read a bit, and executed some code to upload the file(s) however it dumps the content into a BLOB filed type in MySQL and the content is destroyed if it's not a plain text file.
What I'm trying to acomplish here is my own way of document management/sharing amoung different organizations in my company and allow a "one stop shop" for putting/retreiving all related documents to a specific project. Also with that, I'll store the las time the file was upload; by whom, etc.. as well as the last download time, etc...
Anyone know if this is possible?
Thank you very much!
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
file_get_contents() ... however, I would personally use a version control software 
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Ok, so I've narrowed it down even more. It's just M$ files that are not working when downloaded from FF.
It seems like upload works in FF...not as good as in IE, but it seems to work.
I've tried text files, and zip files.. all work no problem with FF. Just excel, word seem to have issues.
The working code I used is here:
http://www.php-mysql-tutorial.com/php-mysql-upload.php
Anyone know how to fix this?
It seems like upload works in FF...not as good as in IE, but it seems to work.
I've tried text files, and zip files.. all work no problem with FF. Just excel, word seem to have issues.
The working code I used is here:
http://www.php-mysql-tutorial.com/php-mysql-upload.php
Anyone know how to fix this?
Well, with more testing.......
When the file file is uploaded with FF (a word, excel) and you attempt to download it with IE... the "FileType" is blank.. but it opens anyhow.
If you upload it with FF, and try to dl it with FF and you choose to "Save to Disk" FF does not know what type of file it is. If you manually choose excel, it opens.
If you choose to open with when you try to DL with FF it will have the default application there, like.. excel. If you open it, it will open.
If it's all done with IE, works like champ. If you upload it with IE, and download it anyway with FF, works like a champ.
Seems like a slight bug with FF ....
When the file file is uploaded with FF (a word, excel) and you attempt to download it with IE... the "FileType" is blank.. but it opens anyhow.
If you upload it with FF, and try to dl it with FF and you choose to "Save to Disk" FF does not know what type of file it is. If you manually choose excel, it opens.
If you choose to open with when you try to DL with FF it will have the default application there, like.. excel. If you open it, it will open.
If it's all done with IE, works like champ. If you upload it with IE, and download it anyway with FF, works like a champ.
Seems like a slight bug with FF ....