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

Strange isue with file upload

Thread began 4/26/2013 3:36 pm by Jon Cunningham | Last modified 4/27/2013 8:18 am by Jon Cunningham | 498 views | 4 replies |

Jon CunninghamBeta Tester

Strange isue with file upload

Hi Guys I have a strange issue with file uploads.

I have 5 upload fields.

User image
Gallery Image 1, Gallery Image 2, Gallery Image 3, Gallery Image 4.

If I upload User Image it stores in the database. If I then upload any gallery images, they store in the database but the upload process removes the User image. If I then add the User image again, the Gallery images are removed from the database.

I have attached my page for reference if anyone could take a look at this for me.

Much appreciated,

Regards

Jonathon

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

Jason ByrnesWebAssist

This page is not actually uploading any images, it is only sending a file name to the database.

for each file field, add a hidden form element, set the value of the hidden form element to use the coresponding column from the recordset for that image field.

then add the WebAssist -> File Manipulation -> Uplaod file server behavior.

for the default file name select the coresponding hidden form element.

repeat this for each file field.

Each file upload behavior will create a new binding group named WA Uploaded File (<field field name>), each of these binding groups will have a server file name binding.

in the update record behavior, you need to bind each image column to the corresponding server file name binding.

Sign in to reply to this post

Jon CunninghamBeta Tester

Hi Jason, I remember now from previous tutorials about the hidden field. I did remember about Server File Name.

Many thanks again

Jonathon

Sign in to reply to this post

Jon CunninghamBeta Tester

I have followed your instructions and this is the out come:

If i upload all of the following in one and submit

User image
Gallery Image 1, Gallery Image 2, Gallery Image 3, Gallery Image 4.

All images upload.

If i then change User image and update the user image updates and
Gallery Image 1, Gallery Image 2, Gallery Image 3, Gallery Image 4.

are removed

Again i have attached my page as an attachment.

Many thanks in advance

Jonathon

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

Jon CunninghamBeta Tester

Solved

I found the issue with the file uploads.

The Default file name was being written as :

'DefaultFileName' => "".((isset($_POST["gallery4Upload"]))?$_POST["gallery1Upload"]:"") ."",

replaced with :

'DefaultFileName' => "".($row_SecurityAssistusers["UserGalleryImage1"]) ."",

Now all works well.

regards

Jonathon

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