close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Not renaming duplicates & allowing spaces

Thread began 1/18/2011 8:26 am by Sally | Last modified 1/19/2011 3:19 pm by Jason Byrnes | 1480 views | 12 replies |

Sally

Not renaming duplicates & allowing spaces

I have a form which uploads to a server. The Upload sb is set that if the file exists, to rename [NewFileName]_[Increment]. But I am being allowed to upload dups.

Also, I do not want spaces allowed in the file names. I'm not sure where the best place to set this. If I select the Spry Text field for the Upload File, the Properties panel says the Widget appears damaged and to either replace it or go into code view and repair it. I'm not sure how do this without wrecking the form. If I go to WA Server Validations and double click on the validation for that field - ((isset($_FILES["Upload"])&&isset($_FILES["Upload"]["name"]))?$_FILES["Upload"]["name"]:"" - I see that Allow Spaces Without Characters is not checked, so I would think this wouldn't be allowed.

Thanks for any help.

Sign in to reply to this post

Jason ByrnesWebAssist

can you send a copy of your page so i can see how it is configured.

To not allow spaces in the file name, you would need to use server side validation.

Sign in to reply to this post

Sally

Here is the file. Are the WA Server Validations on the Server Behavior tabs server side? That is what has the Allow Spaces Without Characters option, which is unchecked.

Thanks.

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

Jason ByrnesWebAssist

Are you saying that it is not renaming the new file if it is a duplicate? Have you double checked in the upload folder? The file system will balk at creating a new file with the same name as the file that already exist, the new file should be given a new name if the file already exists.


Keep in mind though that MyFile.jpg is not a duplicate of myfile.jpg because of the case difference.

To restrict the space in the file name, you need to use the Restrict Content validation type. set it to restrict the space and use the includes type.

Sign in to reply to this post

Sally

Perhaps I hadn't uploaded the updated file because it is incrementing the file name now.

I found the Restrict Content sb and the Restrict Content option. For Server Variable I clicked the lightening bolt and then selected the lightening bolt with Upload field name from my form.

Next I clicked on the + below the Server Variable in the dialog box but don't see how to "set it to restrict the space and use the includes type."

I went to the help file at wa_fv_62.html but not finding what I need there either.

Can you give me more detailed instructions on how to do this? Sorry but it's all new to me.

Thanks.

Sign in to reply to this post

Jason ByrnesWebAssist

in the Dont Allow section, type a space, set the drop down next to it to Includes, then click the plus button to add the space as a restricted character.

Sign in to reply to this post

Sally

Okay, that was not as difficult as I was making it - trying to type in the word spaces.

Thanks again, Jason.

Sign in to reply to this post

Jason ByrnesWebAssist

you're welcome.

Sign in to reply to this post

Sally

I must be doing something wrong, because when I apply Restricted content, I'm not able to upload anything. These are the steps I'm doing:
1. Select the WA Server Validations behavior and choose Restrict content as the type.
2. For the Server variable, click on the lightening bolt and select Upload Files (Upload) and Client File Name.
3. Click the + sign back on the main screen which brings up the screen where I hit the spacebar, select includes and then + to add it.

I'm not uploading any files other than the one I changed to the server because it looks like the code change is made on the page.

But when I test it, I not only can't upload doc with spaces in the filenames, I can't upload docs without them.

I've attached the file, which hopefully will make it easier to see where I've gone wrong.

Thanks.

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

Jason ByrnesWebAssist

you have selected to use the Client File name from the WA Uploaded Files binding collection, this will only have a value after the file is uploaded.

Select the File Field From the form collection.

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