Re: Uploading JPG's
- From: "Mike G." <mgirouard@xxxxxxxxx>
- Date: 24 Aug 2006 11:08:17 -0700
Try starting with the basics... Create a simple upload form and see how
it behaves. I use the following:
<?php
if(!empty($_POST)) {
header('Content-Type: text/plain');
print_r($_FILES);
die();
}
?>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"
enctype="multipart/form-data">
<input type="file" name="image" />
<input type="submit" name="submit" value="Get Info" />
</form>
What does the output look like? If it's still not working, consider the
file size of the image being uploaded. Does it exceed the
upload_max_filesize directive in the php.ini? Maybe when you resave it
in your editor, it compresses it down to a smaller size.
MS wrote:
"Mike" <mike@xxxxxxxxxxxxxxxxxxxxx> wrote in message
news:1156431520.440401.167560@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I have an upload script which works pretty good.
I use it to upload JPG's but I have come accross the following problem.
It appears that only certain types of JPG's are being accepted.
What I have worked out that if I take an image straight off my digital
camera (JPG) and try and upload that, it produces an error. I trap for
file types and size and it won't reconise the file type.
If I take the same image, open it in my graphic package (corel draw in
this case) and save it as a new file, the upload accepts it.
Has anyone seen this before?
It Depends what and how your are trapping....
I trap for... Extensions
gif
jpeg
jpg
png
and MIME types
"image/gif"
"image/jpg"
"image/png"
"image/x-png"
"image/pjpeg"
"image/pjpeg;"
"image/jpeg"
.
- References:
- Uploading JPG's
- From: Mike
- Re: Uploading JPG's
- From: MS
- Uploading JPG's
- Prev by Date: Re: Uploading JPG's
- Next by Date: Re: Help with arrays?
- Previous by thread: Re: Uploading JPG's
- Next by thread: Re: Uploading JPG's
- Index(es):
Relevant Pages
|