PDA

View Full Version : Image not uploading


neileisen207079
04-15-2009, 12:46 PM
I checked all the posts and still cant get this to work. I added a file field to the Checkout page of ecart and then applied the file upload behavior to it following all the instructions.

When I get to the confirm page, I wanted to display the image. I tried first just trying to display the file name, and neither works.

I set a session vairiable for it along with all the other session variables that are set for that page, and i used the posted file field to set it.

The folder I am uploading to has its permissions set to 777 just in case as well.. but nothing is happening. I saw the debugging bindings in the checkout page, but they dont do any good there (Thats where the upload field is) but when I look on the confirm page, they are not available in the bindings panel.

I tried adding them to the checkout page and then copying that code to the next page but that didnt work.

All in all... its not working.

neileisen207079
04-15-2009, 12:52 PM
If it matters, when I select an image file to upload, it only shows the file name and not the whole path in the file field. I have never used this tool before so this may be normal.

Ray Borduin
04-15-2009, 01:09 PM
That is normal. Our code doesn't really have anything to do with the way the uplaod field itself works.

In php the file should be automatically uploaded the the default location, then the DFP code moves it to the directory you specified. Both the default upload folder specified in the php.ini as well as the final destination folder need to have read write privilages for an anonymous internet user.

neileisen207079
04-15-2009, 01:30 PM
I have no idea how to get to the php.ini file or what the default file would be.... but even so, shouldnt the file name be being passed? Also why arent thos bindings codes visible on the confirm page? I think thats 3 different problems there.

Ray Borduin
04-15-2009, 01:35 PM
The bindings are only available on the page where the upload takes place. That actually could be your problem.... try moving the upload code to the confirm page. I think the checkout page submits directly to the confirm page, so any functionality including upload would have to be applied on that page to work.

neileisen207079
04-15-2009, 01:59 PM
Wow... great call Ray. I applied the upload code to the confirm page but KEPT the actual upload on the checkout page (I tried it both ways actually) but putting the upload code on the confirm page made everything work. Now I can upload from the checkout page apply the image name to a session variable in the confirm page and display the actual image using the session variable as the image name on that same confirm page - which is exactly what I was trying to do.

Hopefully this will help others as well... but you sure helped me. Thanks again.