Skip to content
CFWheels plugin for generic file operations using a bin directory in the files folder
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode
tests
.gitignore
.travis.yml
README.md
box.json
filebin.cfc
index.cfm
mimetypes.cfm

README.md

CFWheels File Bin

Description

CFWheels Plugin to simplify file operations by providing a general /bin for file uploads and nested bins.

Usage

    // sample function for uploading a file parameter
    /**
     * filter to handle file uploading
     * 
     * [section: Controller helpers]
     * [category: Controller Functions]
     * 
     * @file
     */
    private string function uploadfileparam() {
        try {
            // initialize a bin using the default directory(no args)
            // than upload the file parameter
            params.filename = bin().upload(params.file);
        } catch (any e) {
            resp.errors = e.message;
            resp.status = e.errorCode NEQ '' ? e.errorCode : 500;
            sendResponse();
        } 
    }

Allowed MIME Types

Allowed MIME Types are defined in mimetypes.cfm. You can override this by modifying the file directly, are passing in your defined mime types as a bin() arg.

Bin Directory

The plugin's first init call will create the files/bin directory if it doesn't already exist.

You can’t perform that action at this time.