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

file naming on upload

Thread began 9/25/2013 12:03 pm by Jamie | Last modified 9/25/2013 3:53 pm by Jamie | 1223 views | 7 replies |

Jamie

file naming on upload

Hey Jason

Am trying to figure out how to get a file to be uploaded and renamed to be the recordset primary ID relevant to each row.

So far I have tried (and failed with) Rename To > select > Recordset > ID which gives me:

<?php echo $row_WADAhomepage['HomepagePanelsID']; ?>

and that doesnt work

What am I doing wrong please?

Many thanks

Jamie

Sign in to reply to this post

Jason ByrnesWebAssist

make sure the WADAhomepage recordset is before the upload file server behavior.

Sign in to reply to this post

Jamie

it is... attached is the screenshot of the server behaviours panel

Sign in to reply to this post

Jason ByrnesWebAssist

can you give more details on what you mean by:

"and that doesnt work"

What is the actual outcome?

How does this differ from what you expect?


"Does not work" is extremely vague and will lead to answers that are just as vague....

Sign in to reply to this post

Jamie

ok, well to start with when I add that through the WA uplaod wizard, I get a DW syntax error warning relating to this:

<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if(isset($_POST["Update"]) || isset($_POST["Update_x"])){
WA_DFP_UploadFiles("WA_UploadResult1", "PanelImage", "2", "\".$row_WADAhomepage['HomepagePanelsID'] .\"", "JPG:100", $WA_UploadResult1_Params);
}
?>



then, when the file is uploaded and go to the live page I get this on the page (and nothing else)

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/young9i8/public_html/admin_cms/homepage_update.php on line 103
Sign in to reply to this post

Jason ByrnesWebAssist

ok, errors are always helpful to include if you are geting them


this section of the code:
"\".$row_WADAhomepage['HomepagePanelsID'] .\""

should be:
"".$row_WADAhomepage['HomepagePanelsID'] .""

Sign in to reply to this post

Jamie

thanks Jason.. the page is loading fine now but it isnt renaming the file on upload... it retains the original filename rather than renaming it to 1, 2, 3 or whatever is in the ID column

Sign in to reply to this post

Jamie

aha.... think i have figured it out.. I was missing

<?php echo $row_WADAhomepage['HomepagePanelsID']; ?>

in the file section of the wizard

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