close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

file upload

Thread began 5/07/2013 8:16 am by Jamie | Last modified 5/08/2013 8:17 am by Jason Byrnes | 2479 views | 13 replies |

Jamie

file upload

Hey Jason

I have a file upload section on an _insert and _update page which adds the file absolutely fine. If I go to the update page and update something else (without adding the image file) then the filename gets removed from the database whn I click on update...

How would I stop that from happening?

Cheers

Jamie

Sign in to reply to this post

Jason ByrnesWebAssist

add a hidden form element to the update page.

bind the hidden form element to the file column from the recordset on the page.

in the File Upload behavior, bind the Default File setting to the hidden form element.

Sign in to reply to this post

Jamie

Have done that (I think)

<input type="hidden" name="LogoHidden" id="LogoHidden" value="<?php echo $row_WADAsponsor_info['SponsorLogo']; ?>"/>

but it isnt working...

Sign in to reply to this post

Jason ByrnesWebAssist

ok, i'll need to see the entire page then to see the rest of the code.

It's always better to attach the page rather than paste a small code snippet. that snippet doesn't tell me anything about how the upload behavior is configured, or how the Update behavior is configured. from that snippet i cannot get a full view of the page, i don't even know if it is using the correct recordset, or if the recordset select statement includes the file column...

Sign in to reply to this post

Jamie

no probs.. see attached

Also, have noticed that even though I set it to change all image filetypes to jpg, it doesnt....if I upload a gif or png it keeps it as a png or gif

Sign in to reply to this post

Jason ByrnesWebAssist

in the update behavior you have bound the SponsorLogo field to the file field binding in the form collection.

you need to use the WA Uploaded Files (SponsorLogo) -> Server File name binding instead.

Sign in to reply to this post

Jamie

sorry. not sure what I need to change?

Sign in to reply to this post

Jason ByrnesWebAssist

  in the update behavior you have bound the SponsorLogo field to the file field binding in the form collection.

you need to use the WA Uploaded Files (SponsorLogo) -> Server File name binding instead.  



look on the binding panel.

you should see that there is a binding group named WA Uploaded Files (SponsorLogo), in this binding group is a binding named Server File name

you need to edit the Update record server behavior.

currently the SponsorLogo filed is bond to the file field in the form collection, this is the problem.

you need to edit that field and bind it to the WA Uploaded Files (SponsorLogo) -> Server File name binding instead

Sign in to reply to this post

Jamie

I have tried doing that to either the hidden field or the upload file behaviouor but it didnt work....

Sign in to reply to this post

Jason ByrnesWebAssist

you don't need to bind the hidden field to the server file name binding,

you need to use the server file name binding in the Update record behavior.

when say "but it didn't work", please be more specific. In what way did it not work?

give me a copy of that page that has thew updates on it so i can see the code.

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