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

combining Digital File Pro with Data Assist

Thread began 2/17/2010 9:01 am by jeffmg279672 | Last modified 2/22/2010 10:09 am by jeffmg279672 | 1470 views | 10 replies |

jeffmg279672

combining Digital File Pro with Data Assist

I have two pages which work fine - one has the facility to upload up to 10 images to a database table using DFP, the other allows the user to add text & description to a listing. Both work fine, but unfortunately the client wants to have the 10-image upload on the same page as the form which updates the database table with a new listing and I'm not sure if this is possible - is it?

I copied the code from the image upload page and added that into the listings page, but although it inserts a new record into the table, it doesn't upload the images...

Is it possible to combine the two in this way, or am I wasting my time?

As always, any assistance appreciated.
Jeff

The two files are attached.

Attached Files
Archive.zip
Sign in to reply to this post

Jason ByrnesWebAssist

Yes, it is possible to have the image upload on the DataAssist insert page. For details, see the "How to apply Digital File Pro to DataAssist Insert and Update pages" tutorial in the How To section of the Digital File Pro support page:
digital-file-pro/

Sign in to reply to this post

jeffmg279672

Works, but image path not properly written in database

I worked my way through the Adding DFP to DA Insert and Update pages and have managed to get my insert listing page working. The listing details get written to the database, and the images get uploaded to the correct folder, but only the image name gets written into the database table, not the path/image name. What it should be showing in phpMyAdmin is (eg) craneimages/image01.jpg - instead it just shows image01.jpg.
I've got the image upload specified correctly (craneimages/) and I can't see where I would tweak the code so that the folder name gets appended to the front of the filename so it gets written correctly into the database.
The result is that on my results page I have missing image icons.
The insert page is attached. I'm using DMW8, incidentally - would that make any difference?
regards,
Jeff

Attached Files
plantList_Insert.php.zip
Sign in to reply to this post

Jason ByrnesWebAssist

you dont want to store the path in the database, only the image file name.


This is because the path will change depending on the location of the page you are trying to display the image on.




you should add the path as part of the src attribute in he image tag:
<img src="path/<?php echo $row_RecordsetName['ImageColumn']; ?>" />

Sign in to reply to this post

jeffmg279672

Jason - thanks for your help as ever.
regards,
Jeff

Sign in to reply to this post

jeffmg279672

upload problem with update page

I've set up the image upload fields on my update page once again following the PDF tutorial, and although the new images get written to the database and uploaded to the correct image folder, it's become an overwrite rather than an upload...
In other words, if I want to add a new image to a listing that has (say) 6 images, I browse for an image to upload in the photo7 field, and when I hit submit, it writes that one image into the database and deletes the first 6. I'm not sure how to overcome this.
Update page attached.
Thanks in advance.

Attached Files
Update_listing.php.zip
Sign in to reply to this post

Jason ByrnesWebAssist

1) The Digital File pro Upload code on this page is not complete.

You will ned to remove the DFP Upload file server behaviors and reapply them

When you reapply the Upload File server behaviors, make sure to bind the default file to the hidden form elements.


2) In the update record server behavior, you are not binding the image columns correctly. for each of the image columns, click the lightning bolt, expand the WA Upload Files (File Field Name) Collection and select the Server File Name binding.

Sign in to reply to this post

jeffmg279672

OK, I've done that and when I update any of the image fields, when the upload is complete and the results page comes up, whatever images were in the database for that listing have been wiped.
I assume that somehow I need to call whatever was in the database for that listing to show in the field where there are images so that I can leave whichever ones need to be retained but I'm not clear how to do that.
Revised page attached, hopefully with correct code this time.

Attached Files
Update_listing.php.zip
Sign in to reply to this post

Jason ByrnesWebAssist

What version of DFP are you using?


In the Up;oad File Serve behavior, make sure you set the Default file.


Click the lightning bolt next to default file and select the appropriate hidden form element for that Upload field. after selecting the form element, use the keyboards enter key to force the selection to stick before clicking OK.

Sign in to reply to this post

jeffmg279672

DFP 1.1.3 is what I'm using. I'm using Dreamweaver 8 on a Mac and DFP2 doesn't seem to be compatible with DMW8, otherwise I would have upgraded.

Sign in to reply to this post
loading

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...