How can I upload PDF/Adobe files to the server?

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
WillUK
Forum Newbie
Posts: 24
Joined: Fri Nov 21, 2008 11:08 am

How can I upload PDF/Adobe files to the server?

Post by WillUK »

Hi,

I have built an application that allows users to send documents/files to our server. However, when I try to send a PDF file, the upload fails.

I have set the datatype to 'Mediumblob' in MySQL, but I have also tried 'int'. Neither seem to work for PDF files.

Can anyone offer a suugestion??

Thanks
Will
User avatar
jaoudestudios
DevNet Resident
Posts: 1483
Joined: Wed Jun 18, 2008 8:32 am
Location: Surrey

Re: How can I upload PDF/Adobe files to the server?

Post by jaoudestudios »

Why dont you just store the file in an upload directory and just store the name of the file in the database?
WillUK
Forum Newbie
Posts: 24
Joined: Fri Nov 21, 2008 11:08 am

Re: How can I upload PDF/Adobe files to the server?

Post by WillUK »

Hi jaoudestudios

That is what I have done. I have created an 'uploads' folder on my 'c' drive which stores all the docs sent to the server....But for some reason PDF files are not accepted.....Excel, word docs etc are uploaded without a problem....

There must be another doctype that I could use (?)
User avatar
jaoudestudios
DevNet Resident
Posts: 1483
Joined: Wed Jun 18, 2008 8:32 am
Location: Surrey

Re: How can I upload PDF/Adobe files to the server?

Post by jaoudestudios »

WillUK wrote:Hi jaoudestudios

That is what I have done. I have created an 'uploads' folder on my 'c' drive which stores all the docs sent to the server....But for some reason PDF files are not accepted.....Excel, word docs etc are uploaded without a problem....
Do you have any filters in your code? (i.e do not allow for *.exe)

WillUK wrote:There must be another doctype that I could use (?)
doctype? :? Can you post your upload script?
WillUK
Forum Newbie
Posts: 24
Joined: Fri Nov 21, 2008 11:08 am

Re: How can I upload PDF/Adobe files to the server?

Post by WillUK »

Thanks jaoudestudios

Sorry for the late reply, but I've got this sorted now :)

Will
Post Reply