uploadify 2.1. carrierwave working. s3 support
This commit is contained in:
parent
f52d6ba791
commit
927918561c
101 changed files with 11079 additions and 86 deletions
10
public/javascripts/uploadify-2.1/example/scripts/_notes/dwsync.xml
Executable file
10
public/javascripts/uploadify-2.1/example/scripts/_notes/dwsync.xml
Executable file
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<dwsync>
|
||||
<file name="check.php" server="ftp.uploadify.com/www.uploadify.com/" local="128870002502195719" remote="128911633200000000" />
|
||||
<file name="expressInstall.swf" server="ftp.uploadify.com/www.uploadify.com/" local="128886114740000000" remote="128911633200000000" />
|
||||
<file name="jquery-1.3.2.min.js" server="ftp.uploadify.com/www.uploadify.com/" local="128799223180000000" remote="128911633200000000" />
|
||||
<file name="jquery.uploadify.v2.0.0.min.js" server="ftp.uploadify.com/www.uploadify.com/" local="128911646622270000" remote="128911646400000000" />
|
||||
<file name="uploadify.php" server="ftp.uploadify.com/www.uploadify.com/" local="128907148701750000" remote="128911633200000000" />
|
||||
<file name="uploadify.swf" server="ftp.uploadify.com/www.uploadify.com/" local="128911508403330000" remote="128911633200000000" />
|
||||
<file name="swfobject.js" server="ftp.uploadify.com/www.uploadify.com/" local="128892320400000000" remote="128911637400000000" />
|
||||
</dwsync>
|
35
public/javascripts/uploadify-2.1/example/scripts/check.php
Executable file
35
public/javascripts/uploadify-2.1/example/scripts/check.php
Executable file
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
/*
|
||||
Uploadify v2.1.0
|
||||
Release Date: August 24, 2009
|
||||
|
||||
Copyright (c) 2009 Ronnie Garcia, Travis Nickels
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
$fileArray = array();
|
||||
foreach ($_POST as $key => $value) {
|
||||
if ($key != 'folder') {
|
||||
if (file_exists($_SERVER['DOCUMENT_ROOT'] . $_POST['folder'] . '/' . $value)) {
|
||||
$fileArray[$key] = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
echo json_encode($fileArray);
|
||||
?>
|
BIN
public/javascripts/uploadify-2.1/example/scripts/expressInstall.swf
Executable file
BIN
public/javascripts/uploadify-2.1/example/scripts/expressInstall.swf
Executable file
Binary file not shown.
19
public/javascripts/uploadify-2.1/example/scripts/jquery-1.3.2.min.js
vendored
Executable file
19
public/javascripts/uploadify-2.1/example/scripts/jquery-1.3.2.min.js
vendored
Executable file
File diff suppressed because one or more lines are too long
26
public/javascripts/uploadify-2.1/example/scripts/jquery.uploadify.v2.1.0.min.js
vendored
Executable file
26
public/javascripts/uploadify-2.1/example/scripts/jquery.uploadify.v2.1.0.min.js
vendored
Executable file
File diff suppressed because one or more lines are too long
4
public/javascripts/uploadify-2.1/example/scripts/swfobject.js
Executable file
4
public/javascripts/uploadify-2.1/example/scripts/swfobject.js
Executable file
File diff suppressed because one or more lines are too long
46
public/javascripts/uploadify-2.1/example/scripts/uploadify.php
Executable file
46
public/javascripts/uploadify-2.1/example/scripts/uploadify.php
Executable file
|
@ -0,0 +1,46 @@
|
|||
<?php
|
||||
/*
|
||||
Uploadify v2.1.0
|
||||
Release Date: August 24, 2009
|
||||
|
||||
Copyright (c) 2009 Ronnie Garcia, Travis Nickels
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
if (!empty($_FILES)) {
|
||||
$tempFile = $_FILES['Filedata']['tmp_name'];
|
||||
$targetPath = $_SERVER['DOCUMENT_ROOT'] . $_REQUEST['folder'] . '/';
|
||||
$targetFile = str_replace('//','/',$targetPath) . $_FILES['Filedata']['name'];
|
||||
|
||||
// $fileTypes = str_replace('*.','',$_REQUEST['fileext']);
|
||||
// $fileTypes = str_replace(';','|',$fileTypes);
|
||||
// $typesArray = split('\|',$fileTypes);
|
||||
// $fileParts = pathinfo($_FILES['Filedata']['name']);
|
||||
|
||||
// if (in_array($fileParts['extension'],$typesArray)) {
|
||||
// Uncomment the following line if you want to make the directory if it doesn't exist
|
||||
// mkdir(str_replace('//','/',$targetPath), 0755, true);
|
||||
|
||||
move_uploaded_file($tempFile,$targetFile);
|
||||
echo "1";
|
||||
// } else {
|
||||
// echo 'Invalid file type.';
|
||||
// }
|
||||
}
|
||||
?>
|
BIN
public/javascripts/uploadify-2.1/example/scripts/uploadify.swf
Executable file
BIN
public/javascripts/uploadify-2.1/example/scripts/uploadify.swf
Executable file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue