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

Can't get file names saved correctly

Thread began 10/20/2009 6:30 pm by roger391472 | Last modified 10/21/2009 12:23 pm by roger391472 | 1212 views | 9 replies |

roger391472

Can't get file names saved correctly

Hello,

I've read everything I can read on this and can't figure out why this is not working. I'm using DFP and DataAssist on a custom form that I had already built.

The problem that I'm having is with file naming. I can't get it to save the file as "server file name" AND save that name in the database. With the current settings it's only saving the extension without a file name at all. It's saving in in the folder that way and that is what is inserted into the database column.

I currently have the "insert record" for the file field set with the value "WA server file name" for the full size image and the thumb. The upload wizard is also set with file naming of "server file name" for both images. The file rename is set to "rename" [filename]_increment.

The code is attached.

Thanks in advance.

Roger

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

neilo

Why not use [Filename] instead of [Server_filename]? It presumably at that point doesn't have a server filename so can't be named after a server filename. Then rename as filename plus increment as you suggest.

Sign in to reply to this post

Jason ByrnesWebAssist

Neilo is correct, in the File Name field of DFP, enter [FileName].

you cannot use the server file name binding in the DFP wizard, because it has not been created yet.

Using [FileName] tells dfp to use the client file name + whatever renaming functions you set to create the server file name.

Sign in to reply to this post

roger391472

Hi Neilo,

Well, I was wanting to use the server file name because I figured that would be one more layer of protection. I'm new to this though so I haven't been able to read up on all the security stuff yet but I think someone could upload something like filename.exe.jpg and use it later.

I've had it where it would name the file with "server file name" and if I remember correctly I think I've been able to get it to insert the server name in the database but not where they both matched at the same time.

Can't remember now, I've been through so many iterations of it.

Thanks,

Roger

Sign in to reply to this post

roger391472

Hmmm, This is getting all too weird now.

OK, I think I did it as you guys instructed but it's still saving the files in the folder as just .jpg with no filename. It does save the full client filename in the database columns though.

Here's what I did:
In the insert record I changed the value on the file upload field to the name of the file field.

In the DFP upload wizard I changed the full size and thumb filename settings to client file name.

The rename if existing file naming is set to [filename]_increment.

Is that the way you were suggesting or did I miss something?

Thanks,

Roger

Sign in to reply to this post

roger391472

Thanks Neilo and Jason, I got it.

I thought you meant to use the dynamic binding for "client file name" I didn't realize you meant to literally put the [filename] in the field.

Just curious though, would it be possible to use the server file name if you put an additional "upload" button by each upload file field so it uploaded prior to the final page submit?

Thanks again,

Roger

Sign in to reply to this post

roger391472

Hello again,

I'm sorry guys but I still can't get this figured out. I had everything working but when I tested it to find out what happened just in case a file was duplicated then it incremented the file name but it didn't reflect that change in the database column. So I started trying to fix that and now I'm back to it's uploading the files fine but nothing is getting entered into the database. I guess I should ask this first since I couldn't find anything in the documentation about it..do you have to make a separate instance of DFP upload for each file field in the form. I'm guessing that's what has to be done but I'm not sure. I've got 4 file upload fields in the form and when I do create 4 separate instances of DFP upload then when I go to DataAssist insert record it has 4 sets of dynamic options in each WA drop down list.

I'm just stuck here so any help would be greatly appreciated.

Thanks,

Roger

Sign in to reply to this post

roger391472

Solved

Thanks for the help all, it's working now. Last problem was just one of those "couldn't see it" problems. On two of the DFP file fields I had set it to "rename existing file" rather than "rename new file" by mistake. One of those things you just keep looking at over and over and not seeing it.

Thanks,

Roger

Sign in to reply to this post

neilo

Nice one Roger, - glad you got it sorted. I have multiple 'can't see it' problems every time!

Sign in to reply to this post

roger391472

Yep, I know, it makes you feel really stupid when you've looked at the same thing 50 TIMES and you still don't see it. LOL

Thanks for the help.

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