• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

cffile

New Here ,
Jul 25, 2006 Jul 25, 2006

Copy link to clipboard

Copied

Hi i have a file upload, which user upload an excel file, what i want to do is automaticaly rename the file to the session.user

can this be done if so how would i alter this code

<form action="uploadfile.cfm" method="POST" name="frmupload" enctype="multipart/form-data">
<input type="file" name="file_path">
<input type="submit" name="submit_upload" value="upload">
</form>
TOPICS
Advanced techniques

Views

204

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jul 25, 2006 Jul 25, 2006

Copy link to clipboard

Copied

LATEST
You can't rename files with HTML, since HTML is not a programming language. Thus you don't alter your code necessarily at all, but you'll have to add some ColdFusion programming. You can rename the the server-side file after it has been uploaded, using the <CFFILE> tag.

See:
http://livedocs.macromedia.com/coldfusion/7/htmldocs/00000253.htm
http://livedocs.macromedia.com/coldfusion/7/htmldocs/00000252.htm

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation