Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
tripodkid  
#1 Posted : Tuesday, February 21, 2006 7:04:53 AM(UTC)
tripodkid

Rank: Member

Groups: Member
Joined: 2/21/2006(UTC)
Posts: 3

Hello, I have just started using the trail version of Image Processor and have got the sample scripts to work. However, I don't understand how the images are being uploaded! I thought it was POST. But when I print_r($_POST) or print_r($_FILES) on Upload.php I just return empty arrays. But image files are being sent to ../Gallery. I know I must be missing something really stupid here! Thanks, Chris
Alex Makhov  
#2 Posted : Tuesday, February 21, 2006 12:59:22 PM(UTC)
Alex Makhov

Rank: Advanced Member

Groups: Member
Joined: 8/3/2003(UTC)
Posts: 998

Hello, Try to print filenames on by one in the cycle.
Sincerely yours, Alex Makhov UserPostedImage Follow Aurigma on Twitter!
tripodkid  
#3 Posted : Wednesday, February 22, 2006 12:01:50 AM(UTC)
tripodkid

Rank: Member

Groups: Member
Joined: 2/21/2006(UTC)
Posts: 3

Hello, Unfortunately, that did not work. I am using the PHP sample script for uploading files seperately in an attempt to understand how to utilize Image Uploader in my application. There are two things I have a problem with and don't understand. 1. Uploading one image works perfectly and the image file gets moved to ../Gallery. However, if I try to upload multiple images any existing images are deleted and only the 1st image uploaded will remain. This happens with all sample scripts I have tried. But this is what I really don't understand! 2. Upload.php is using the super globals $_POST and $_FILES e.g.
Code:
   $imageName = "SourceFile_1";
   $size=$_FILES[$imageName][size]; 
So one would presume that:
Code:
   echo $size=$_FILES[$imageName][size]; 
would return the value [size] but both $_POST and $_FILES are being returned as empty arrays. This is confirmed by using either print_r() or var_dump() on either Upload.php or PictureGallery.php Furthermore, since $_FILES is being used I would expect to see move_uploaded_file() to move the files into ../Gallery but I do not. Am I then to presume that ../Gallery is actually being used as the tmp folder and I should use move_uploaded_file() to move the files to another directory. But how would I accomplish that when $_FILES is returning as empty? Thanks for your help! I'm quite new to dynamic web development. I know that I must be missing something here! Image Uploader is a great product, even though I don't fully understand it yet! It's the perfect solution for the application I'm working on which could easily result in the purchase of several ActiveX/Java single IP licences! Chris

Edited by user Thursday, December 20, 2007 5:05:50 PM(UTC)  | Reason: Not specified

tripodkid  
#4 Posted : Wednesday, February 22, 2006 8:55:10 AM(UTC)
tripodkid

Rank: Member

Groups: Member
Joined: 2/21/2006(UTC)
Posts: 3

Yea, I figured it out! Page has cycled with no input thus the arrays are empty.
Alex Makhov  
#5 Posted : Wednesday, February 22, 2006 11:38:45 AM(UTC)
Alex Makhov

Rank: Advanced Member

Groups: Member
Joined: 8/3/2003(UTC)
Posts: 998

Hello,
Quote:
Yea, I figured it out!
Glad to hear that!
Quote:
1. Uploading one image works perfectly and the image file gets moved to ../Gallery. However, if I try to upload multiple images any existing images are deleted and only the 1st image uploaded will remain. This happens with all sample scripts I have tried.
Image Uploader Demo samples always remove all files from the gallery before new files to be written. If you upload files one by one the previous files are deleted too. You have to change the upload processing code to avoid these files deletion.
Sincerely yours, Alex Makhov UserPostedImage Follow Aurigma on Twitter!
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.