This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ============================================================================ | |
// | |
// Copyright (c) 2006-2015, Talend Inc. | |
// | |
// This source code has been automatically generated by_Talend Open Studio for Data Integration | |
// / Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// http://www.apache.org/licenses/LICENSE-2.0 | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//We will collect our results into these arrays, to summarize our results later. | |
$nofile = Array(); | |
$filecopyerror = Array(); | |
$successlist = Array(); | |
$posterror = Array(); | |
foreach($dl as $d){ | |
//check if file exists | |
$sourcefile = "/<folder>/Attachments/".$d['source']; | |
//we're going to rewrite the files to a tmp directory. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//In this case, we only want the documents created by the administrator. (the ones that we imported earlier) | |
$filter_arguments = array( | |
"filter" => array( | |
array( | |
'$and' => array( | |
array( | |
"modified_user_id" => array( | |
'$equals'=>"1", | |
) | |
), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$filetype = Array( | |
"application/pdf" => ".pdf", | |
"application/msword" => ".doc", | |
"application/x-pdf" => ".pdf", | |
"application/vnd.openxmlformats-officedocument.wordprocessingml.document" => ".docx", | |
"application/vnd.ms-powerpoint" => ".ppt", | |
"application/x-zip-compressed" => ".zip", | |
"application/vnd.openxmlformats-officedocument.presentationml.presentation" => ".pptx", | |
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" => ".xlsx", |