Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Problem Uploading Images


Code Red

Recommended Posts

I've been trying to add the facility to upload an image with each product review (for things such as magazine "Best In Test" rosettes etc) but I can't get the images to upload. This facility is only available to reviews entered via the admin page, not to visitors.

 

I've been using this on the review entry -

 

<td class="main"><?php echo tep_draw_file_field('reviews_image'); ?></td>

 

And this where the form is processed -

 

$reviews_image = new upload('reviews_image', DIR_FS_CATALOG_IMAGES);

 

but nothing happens - not even an attempt to upload the file. When I stuck a print_r($reviews_image); at the processing stage, I get this -

 

upload Object ( [file] => reviews_image [filename] => [destination] => /my_website_path/images/ [permissions] => 511 [extensions] => Array ( ) [tmp_filename] => [message_location] => session )

 

I notice that both the [filename] and [tmp_filename] values are empty... any ideas?

Link to comment
Share on other sites

I've still not cracked this problem - I've even tried using plain PHP code (ie not using any OSC functions) and I still get a big nothing! I'm uploading an image to the same images folder as categories.php uses, but despite using the same OSC code, or plain PHP the image will not upload. This is the same case whether I'm working with a local copy of the site, or the site on the server.

 

Is there something obvious I'm missing? I'd appreciate some advice.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...