Click to See Complete Forum and Search --> : image uploading problem
Harry7979
May 8th, 2004, 10:04 AM
Hey,
I have a code that uploads images. This works fine on our normal pc's (IBM pc's). But, when we try it on Macintosh, it gives problem. Please, help me with the code that will resolve this problem.
This is URGENT !!!
Have a great day
Sonu Kapoor
May 8th, 2004, 10:38 AM
[Attachement deleted]
Harry7979
May 10th, 2004, 12:13 AM
Hey Sonu,
I'm glad you replied to my post. But the file that you'd attatched, here it says, 'Attatchment deleted'. If you dont mind please send back the attachment.
By the way, they call me Sonu as well.
Originally posted by Sonu Kapoor
[Attachement deleted] :cool:
hspc
May 10th, 2004, 02:01 AM
I think the attachemnt was deleted because it violates theAcceptable Use Policy (http://www.jupitermedia.com/corporate/privacy/aup.html)
please check it especially this :You will not use profanity in our forums, and will neither post with language or content that is obscene, sexually oriented, or sexually suggestive nor link to sites that contain such content
about the uploading problem .. sending some code may help us helping you :)
Harry7979
May 10th, 2004, 02:31 AM
Hi,
Sorry I forgot to mention, the script is written using PHP. I'm creating a thumbnail for this image as well.
This is the code :
Here, vphotoname is input type=file and PHOTOALBUM_SITE is a global variable which is assigned a path using 'define' in a config file
if(is_file($vphotoname) && !empty($vphotoname))
{
$path = PHOTOALBUM_SITE.$vphotoname_name;
copy($vphotoname,$path);
//$createphoto = createimage($vphotoname_name,$path);
//if($createphoto)
//{
$pos = strlen($vphotoname_name)-strpos(strrev($vphotoname_name),".")-1;
$sourcename = substr($vphotoname_name,0,$pos);
if($vphotoname_type == "image/pjpeg")
{
$vphotoname_thumb = $sourcename."_TH.jpg";
$vphotoname_large = $sourcename."_LG.jpg";
}
elseif($vphotoname_type == "image/gif")
{
$vphotoname_thumb = $sourcename."_TH.gif";
$vphotoname_large = $sourcename."_LG.gif";
}
elseif($vphotoname_type == "image/x-png")
{
$vphotoname_thumb = $sourcename."_TH.png";
$vphotoname_large = $sourcename."_LG.png";
}
$thumimg = THUMB_PHOTOALBUM_SITE.$vphotoname_thumb;
$largeimg = LARGE_PHOTOALBUM_SITE.$vphotoname_large;
copy($vphotoname,$thumimg);
copy($vphotoname,$largeimg);
$db_sql = $obj->insert("insert into photoalbum(imemberid,vImage_Type,vphotoname_thumb,vphotoname_large,vtitle,vcopyright,vdescription,vrating,estatus) values ('$sess_mem_id','$vImage_Type','$vphotoname_thumb','$vphotoname_large','$vtitle','$vcopyright',
'$vdescription','$vrating','0')");
unlink($path);
//}
}
Let me know if you can do something about this.
I'm really glad that you people are trying your level best here to help me resolve this. Thanks a lot anyway.
Originally posted by hspc
I think the attachemnt was deleted because it violates theAcceptable Use Policy (http://www.jupitermedia.com/corporate/privacy/aup.html)
please check it especially this :You will not use profanity in our forums, and will neither post with language or content that is obscene, sexually oriented, or sexually suggestive nor link to sites that contain such content
about the uploading problem .. sending some code may help us helping you :)
Sonu Kapoor
May 10th, 2004, 07:40 AM
Originally posted by Harry7979
Hey Sonu,
I'm glad you replied to my post. But the file that you'd attatched, here it says, 'Attatchment deleted'. If you dont mind please send back the attachment.
By the way, they call me Sonu as well.
:cool:
As hspc already stated it is against the AUP to attache such images. Please read the quote from hspc. I cant send you the image back.
Sonu
Harry7979
May 12th, 2004, 10:12 AM
Hey...somebody's gotta help me. No one has yet provided me with a solution.
:eek:
I'm sure many of you'll must have faced this problem before.....this is a bit urgent...so please...any kind of help from your side would be of great help to me
bye
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.