For the complete experience, please enable JavaScript in your browser. Thank you!

  • Creative Cloud
  • Photoshop
  • Illustrator
  • InDesign
  • Premiere Pro
  • After Effects
  • Lightroom
  • See all
  • See plans for: businesses photographers students
  • Document Cloud
  • Acrobat DC
  • eSign
  • Stock
  • Elements
  • Marketing Cloud
  • Analytics
  • Audience Manager
  • Campaign
  • Experience Manager
  • Media Optimizer
  • Target
  • See all
  • Acrobat Reader DC
  • Adobe Flash Player
  • Adobe AIR
  • Adobe Shockwave Player
  • All products
  • Creative Cloud
  • Individuals
  • Photographers
  • Students and Teachers
  • Business
  • Schools and Universities
  • Marketing Cloud
  • Document Cloud
  • Stock
  • Elements
  • All products
  • Get Support
    Find answers quickly. Contact us if you need to.
    Start now >
  • Learn the apps
    Get started or learn new ways to work.
    Learn now >
  • Ask the community
    Post questions and get answers from experts.
    Start now >
    • About Us
    • Careers At Adobe
    • Investor Relations
    • Privacy  |  Security
    • Corporate Responsibility
    • Customer Showcase
    • Events
    • Contact Us
News
    • 3/22/2016
      Adobe Summit 2016: Are You An Experience Business?
    • 3/22/2016
      Adobe Announces Cross-Device Co-op to Enable People-Based Marketing
    • 3/22/2016
      Adobe and comScore Advance Digital TV and Ad Measurement
    • 3/22/2016
      Adobe Marketing Cloud Redefines TV Experience
CFML Reference / 

FileUploadAll

Adobe Community Help


Applies to

  • ColdFusion

Contact support

 
By clicking Submit, you accept the Adobe Terms of Use.
 

Description

Uploads all files sent to the page in an HTTP request to a directory on the server.

Returns

An array of struct that provides the file upload status.For details of what the struct contains, see the Usage Section of cffile action = "uploadAll".

Function Syntax

FileUploadAll(destination)
FileUploadAll(destination, accept)
FileUploadAll(destination, accept, nameConflict)

History

ColdFusion 11: Added ContinueOnError and Errors attribute.

ColdFusion 9.0.1: Added this function.

Parameter

Value

Description

destination

Path of directory in which to upload the file. If not an absolute path (starting with a drive letter and a colon, or a forward or backward slash), it is relative to the ColdFusion temporary directory, returned by the function getTempDirectory.
If the destination you specify does not exist, ColdFusion creates a file with the specified destination name. For example, if you specify the destination C:\XYZ, ColdFusion creates a file XYZ in the C: drive.

accept

Limits the MIME types to accept. Comma-delimited list. For example, the following code permits JPEG and Microsoft Word file uploads:{{"image/jpg, application/msword"}}The browser uses the filename extension to determine file type.

nameConflict

Action to take if file has the same name of a file in the directory.

  • Error: File is not saved. ColdFusion stops processing the page and returns an error.
  • Skip: File is not saved. Permits custom behavior based on file properties.
  • Overwrite: Replaces file.
  • MakeUnique: Forms a unique filename for the upload; name is stored in the file object variable serverFile.

Added in ColdFusion 11:

Value Required Default Description
ContinueOnError  Optional False

By default, when uploading one of the files fail, the remaining files will not be uploaded. If this value is set to true, file upload continues evern after encountering an upload error. A file upload error happens due to the following reasons:

1. Empty file
2. Invalid file type
3. Invalid MIME or extension
4. File already exists

In the case of an upload failure, the error details will be stored in the errors attribute.

Errors Optional  cffile.uploadAllErrors

 The name of the variable in which the file upload errors will be stored. Errors will be populated in the specfied variable name when continueOnError is true.After the file upload is completed, this tag creates an array of structures that contains upload failure information for each upload failure.

The upload failure information error structure contains the following fields:

  • REASON - The reason for the failure
  • DETAIL - File upload failure detail
  • MESSAGE - A detailed message depicting the failure
  • CLIENTFILE - Name of the file uploaded from the client's system
  • CLIENTFILEEXT - Extension of the uploaded file on the client system (without a period)
  • CLIENTFILENAME - Name of the uploaded file on the client system (without an extension) 
  • INVALID_FILE_TYPE - If the file mime type or extension is not in the specified accept attribute. If the reason is INVALID_FILE_TYPE, two additional keys will be available in the structure. 
    • ACCEPT: list of mime types or file extensions given in the tag
    • MIMETYPE: mime type of the uploaded file
  • EMPTY_FILE - If the uploaded file is an empty file
  • FILE_EXISTS - If any file with the given name already exists in the destination and the overwritepolicy is error.
  • DEST - The destination where file is copied
  • FORM_FILE_NOT_FOUND - If the uploaded file is not found on the server
 

See also

FileUpload

Usage

cffile action = "uploadAll"

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy

Choose your region United States (Change)   Products   Downloads   Learn & Support   Company
Choose your region Close

Americas

Europe, Middle East and Africa

Asia Pacific

  • Brasil
  • Canada - English
  • Canada - Français
  • Latinoamérica
  • México
  • United States
  • Africa - English
  • Österreich - Deutsch
  • Belgium - English
  • Belgique - Français
  • België - Nederlands
  • България
  • Hrvatska
  • Cyprus - English
  • Česká republika
  • Danmark
  • Eesti
  • Suomi
  • France
  • Deutschland
  • Greece - English
  • Magyarország
  • Ireland
  • Israel - English
  • ישראל - עברית
  • Italia
  • Latvija
  • Lietuva
  • Luxembourg - Deutsch
  • Luxembourg - English
  • Luxembourg - Français
  • Malta - English
  • الشرق الأوسط وشمال أفريقيا - اللغة العربية
  • Middle East and North Africa - English
  • Moyen-Orient et Afrique du Nord - Français
  • Nederland
  • Norge
  • Polska
  • Portugal
  • România
  • Россия
  • Srbija
  • Slovensko
  • Slovenija
  • España
  • Sverige
  • Schweiz - Deutsch
  • Suisse - Français
  • Svizzera - Italiano
  • Türkiye
  • Україна
  • United Kingdom
  • Australia
  • 中国
  • 中國香港特別行政區
  • Hong Kong S.A.R. of China
  • India - English
  • 日本
  • 한국
  • New Zealand
  • Southeast Asia (Includes Indonesia, Malaysia, Philippines, Singapore, Thailand, and Vietnam) - English
  • 台灣

Commonwealth of Independent States

  • Includes Armenia, Azerbaijan, Belarus, Georgia, Moldova, Kazakhstan, Kyrgyzstan, Tajikistan, Turkmenistan, Ukraine, Uzbekistan

Copyright © 2016 Adobe Systems Incorporated. All rights reserved.

Terms of Use | Privacy | Cookies

AdChoices