close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Incorrect path in dB when images are uploaded

Thread began 3/22/2013 2:26 pm by Kamen Nikolov | Last modified 3/22/2013 3:46 pm by Jason Byrnes | 410 views | 3 replies |

Kamen Nikolov

Incorrect path in dB when images are uploaded

Hi,

I have created product pages with Data Bridge and they work great. One small glitch on admin/products_insert.php and admin/products_udate.php the I have two upload boxes one for ProductThumb and one for ProductImage respectively setup in the dB as _images/products_t/someimage_t.jpg and _images/products/someimage.jpg.

In the Shopping Cart this setup and everything is working fine, but if I try to go and insert or update product and I set the path to upload correctly the entry in the dB instated of being _images/products_t/someimage_t.jpg and _images/products/someimage.jpg. is just someimage_t.jpg and someimage.jpg which doesn’t display the images in the Shopping Cart and PrductDetails.

Here is the setup now:

<?php
// WA_UploadResult1 Params Start
$WA_UploadResult1_Params = array();
// WA_UploadResult1_1 Start
$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(
'UploadFolder' => "../_images/products_t",
'FileName' => "[FileName]",
'DefaultFileName' => "".($row_WADAproducts["ProductThumb"]) ."",
'ResizeType' => "0",
'ResizeWidth' => "0",
'ResizeHeight' => "0",
'ResizeFillColor' => "" );
// WA_UploadResult1_1 End
// WA_UploadResult1 Params End
?>
<?php
// WA_UploadResult2 Params Start
$WA_UploadResult2_Params = array();
// WA_UploadResult2_1 Start
$WA_UploadResult2_Params["WA_UploadResult2_1"] = array(
'UploadFolder' => "../_images/products",
'FileName' => "[FileName]",
'DefaultFileName' => "".($row_WADAproducts["ProductImage"]) ."",
'ResizeType' => "0",
'ResizeWidth' => "0",
'ResizeHeight' => "0",
'ResizeFillColor' => "" );
// WA_UploadResult2_1 End
// WA_UploadResult2 Params End
?>

Any help will be appreciate.

Kamen

Sign in to reply to this post

Jason ByrnesWebAssist

Only the file name should be stored in the database. not the path.


the path should be added to the src attribute of the image tab on the page that displays the images

php:
<img  src="path/to/images/<?php echo($row_recordsetName['imagecolumn']); ?> />
Sign in to reply to this post

Kamen Nikolov

Thank you Jason,

Is that set up in the fileUpload behavior?

Sign in to reply to this post

Jason ByrnesWebAssist

no, it is set up in the image tag.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...