Date: 11/28/01
- Next message: Andrey Hristov: "Re: [PHP-DB] Storing JPEG's in MySQL -- Is it possible?"
- Previous message: PaulC: "Re: [PHP-DB] Storing JPEG's in MySQL -- Is it possible?"
- In reply to: PaulC: "Re: [PHP-DB] Storing JPEG's in MySQL -- Is it possible?"
- Next in thread: Andrey Hristov: "Re: [PHP-DB] Storing JPEG's in MySQL -- Is it possible?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Try
header('Content-type: image/gif');
Regards,
Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
BALANCED SOLUTIONS
----- Original Message -----
From: "PaulC" <couton <email protected>>
To: <php-db <email protected>>
Sent: Wednesday, November 28, 2001 10:28 AM
Subject: Re: [PHP-DB] Storing JPEG's in MySQL -- Is it possible?
> I am using this to read the uploaded file
>
> $attach_data =
> addslashes(fread(fopen($HTTP_POST_FILES['attachment']['tmp_name'], "r"),
> filesize($HTTP_POST_FILES['attachment']['tmp_name'])));
>
> I'm then insterting that into the MySQL database, along with the
> $attachment_type
>
> It works fine for a GIF, but a JPEG isn't displayed correctly.
>
> Thanks,
> Paul
>
>
> "Ck Raju" <ckra <email protected>> wrote in message
> news:01112803425803.01167 <email protected>
> > Please show your script, so that we can answer you better.
> > CK Raju
> >
> > On Tuesday 27 November 2001 16:37, PaulC wrote:
> > > Hi,
> > >
> > > I've wrote a bit of code to upload a file, and store it in a MySQL
> > > "longblob" field.
> > > If I upload a GIF, and store it in MySQL I am able to retrieve it fine
> > > using a PHP script.
> > >
> > > However, a JPEG uploads, but cannot be retrieved successfully.
> > > (I get a broken image symbol in IE)
> > >
> > > Does anybody know why this is???
> > >
> > > Thanks,
> > > Paul
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe <email protected>
> For additional commands, e-mail: php-db-help <email protected>
> To contact the list administrators, e-mail: php-list-admin <email protected>
>
>
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Andrey Hristov: "Re: [PHP-DB] Storing JPEG's in MySQL -- Is it possible?"
- Previous message: PaulC: "Re: [PHP-DB] Storing JPEG's in MySQL -- Is it possible?"
- In reply to: PaulC: "Re: [PHP-DB] Storing JPEG's in MySQL -- Is it possible?"
- Next in thread: Andrey Hristov: "Re: [PHP-DB] Storing JPEG's in MySQL -- Is it possible?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

