Search
Search
Search
Search
Information
Information
Light
Dark
Open actions menu
Basic upload method
Bypass upload method
Tips!
If you encounter an error (by firewall) while uploading using both methods,
try changing extension of the file before uploading it and rename it right after.
This uploader supports multiple file upload.
Submit
~
var
www
podiocopy.bitkit.dk
httpdocs
app
Http
Controllers
Transfer
File Content:
MoveAsynchronousController.php
<?php namespace App\Http\Controllers\Transfer; /** * Created by PhpStorm. * User: jis * Date: 20/5/15 * Time: 3:55 PM */ use App\Http\Controllers\Controller; use App\Modules\Application\AppMoveRepo; use App\Modules\Application\AppToAppMoveRepo; use App\Modules\Auth\AuthRepository; use App\Modules\GenModels\Estimate; use App\Modules\GenModels\TransferQueue; use App\Modules\OrganizationMove\OrganizationRepo; use App\Modules\WorkSpace\WorkSpaceMoveRepo; use Exception; use Input; use Log; use MongoDB\BSON\ObjectId; use MongoId; class MoveAsynchronousController extends Controller { public function __construct() { $this->authRepo = new AuthRepository(); $this->transferQModel = new TransferQueue(); try { ini_set('memory_limit', '512M'); ini_set('max_execution_time', 3600); // seconds } catch (Exception $e) { Log::error($e); } } /** * @param $queueID * start the queue process - asynchronous */ public function getStartQueue($queueID) { Log::info("getStartQueue:" . $queueID); $transferQueue = $this->transferQModel->findOne(array('_id' => new ObjectId($queueID))); if ($transferQueue === null) { $estimateModel = new Estimate(); $transferQueue = $estimateModel->findOne(array('_id' => new ObjectId($queueID))); } if ($this->authRepo->authenticateUser($transferQueue['user'])) { switch ($transferQueue['type']) { case 'organization_move': $orgRepo = new OrganizationRepo(); $orgRepo->startOrganizationMove($queueID); break; case 'space_move': $workspaceRepo = new WorkSpaceMoveRepo(); $workspaceRepo->startSpaceMove($queueID); break; case 'app_move': $appMoveRepo = new AppMoveRepo(); $appMoveRepo->startAppMove($queueID); break; case 'app_to_app_move': $appMoveRepo = new AppToAppMoveRepo(); $appMoveRepo->processQueue($queueID); break; } } else { //todo not authenticated log::error("Auth fail"); } } public function getDoNextStepOfFirstSpace($queueID) { $transferQueue = $this->transferQModel->findOne(array('_id' => new ObjectId($queueID))); if ($this->authRepo->authenticateUser($transferQueue['user'])) { $workspaceRepo = new WorkSpaceMoveRepo(); $workspaceRepo->doNextStepOfFirstSpace($queueID); } } public function getDoUpdateFirstSpace($queueID) { Log::info("getDoUpdateFirstSpace:" . $queueID); $transferQueue = $this->transferQModel->findOne(array('_id' => new ObjectId($queueID))); if ($this->authRepo->authenticateUser($transferQueue['user'])) { $workspaceRepo = new WorkSpaceMoveRepo(); $workspaceRepo->updateFirstSpace($queueID); } } public function getDoNextStepOfFirstApp() { $queueID = Input::get('queue_id'); $transferQueue = $this->transferQModel->findOne(array('_id' => new ObjectId($queueID))); if ($this->authRepo->authenticateUser($transferQueue['user'])) { $appMoveRepo = new AppMoveRepo(); $appMoveRepo->doNextStepOfFirstApp(intval(Input::get('space_id')), $queueID); } } public function getDoUpdateFirstApp() { $queueID = Input::get('queue_id'); $transferQueue = $this->transferQModel->findOne(array('_id' => new ObjectId($queueID))); if ($this->authRepo->authenticateUser($transferQueue['user'])) { $appMoveRepo = new AppMoveRepo(); $appMoveRepo->updateFirstApp(intval(Input::get('space_id')), $queueID); } } }
Edit
Download
Unzip
Chmod
Delete