protected function uploadArchive()
    {

        if ($_FILES['content']['error'] !== UPLOAD_ERR_OK) {

            \common_Logger::w('File upload failed with error ' . $_FILES['content']['error']);
            switch ($_FILES['content']['error']) {
                case UPLOAD_ERR_INI_SIZE:
                case UPLOAD_ERR_FORM_SIZE:
                    $error = __('Archive size must be lesser than : ') . ini_get('post_max_size');
                    break;
                case UPLOAD_ERR_NO_FILE:
                    $error = __('No file uploaded');
                    break;
                default:
                    $error = __('File upload failed');
                    break;
            }
            return array('error' => $error);
        }

        $filePath = $this->tmpDir . '/' . $_FILES['content']['name'];
        if (!move_uploaded_file($_FILES['content']['tmp_name'], $filePath)) {
            return array('error' => __('Unable to move uploaded file'));
        }

        return $filePath;
    }