public function xliffImportUploadAction()
{
$jobs = [];
$id = uniqid();
$importFile = PIMCORE_SYSTEM_TEMP_DIRECTORY . "/" . $id . ".xliff";
copy($_FILES["file"]["tmp_name"], $importFile);
$xliff = simplexml_load_file($importFile, null, LIBXML_NOCDATA);
$steps = count($xliff->file);
for ($i = 0; $i < $steps; $i++) {
$jobs[] = [["url" => "/admin/translation/xliff-import-element", "params" => ["id" => $id, "step" => $i]]];
}
$this->_helper->json(["success" => true, "jobs" => $jobs, "id" => $id], false);
// set content-type to text/html, otherwise (when application/json is sent) chrome will complain in
// Ext.form.Action.Submit and mark the submission as failed
$this->getResponse()->setHeader("Content-Type", "text/html");
}