jQuery File Upload plugin for CakePHP 2.x

Got a working copy of https://blueimp.github.io/jQuery-File-Upload/ file upload plugin for CakePHP 2.5.5 built as a plugin. Forked and modified from the original repository https://github.com/hugodias/FileUpload into https://github.com/inimist/FileUpload to incorporate latest files and functionality. The drag & drag uploads work inside any form of a CakePHP application now. Files can also be uploaded to local directories following the path /modelname/ID. Very useful work indeed ;)

Here is the working copy at https://github.com/inimist/FileUpload

cakephp-jquery-drag-drop-file-upload

for IIS on Windows, make sure that web.config does have a isDirectory option included:

[xml]
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Redirect static resources" stopProcessing="true">
<match url="^(ico|img|css|files|js|jquploads|logexcel|taskexcel|userexcel|controlexcel|auditexcel)(.*)$" />
<action type="Rewrite" url="app/webroot/{R:1}{R:2}" appendQueryString="false" />
</rule>
<rule name="Imported Rule 1" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
</conditions>
<action type="Rewrite" url="index.php?url={R:1}" appendQueryString="true" />
</rule>
<rule name="Imported Rule 2" stopProcessing="true">
<match url="^$" ignoreCase="false" />
<action type="Rewrite" url="/" />
</rule>
<rule name="Imported Rule 3" stopProcessing="true">
<match url="(.*)" ignoreCase="false" />
<action type="Rewrite" url="/{R:1}" />
</rule>
<rule name="Imported Rule 4" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
</conditions>
<action type="Rewrite" url="index.php?url={R:1}" appendQueryString="true" />
</rule>
</rules>
</rewrite>
<staticContent>
<mimeMap fileExtension="woff" mimeType="application/font-woff" />
<mimeMap fileExtension="woff2" mimeType="application/font-woff" />
</staticContent>
</system.webServer>
</configuration>[/xml]

Leave a Reply