/**
* Form constructor for the translation import screen.
+ *
+ * @internal
*/
class ImportForm extends FormBase {
],
'#size' => 50,
'#upload_validators' => $validators,
+ '#upload_location' => 'translations://',
'#attributes' => ['class' => ['file-import-input']],
];
$form['langcode'] = [
* {@inheritdoc}
*/
public function validateForm(array &$form, FormStateInterface $form_state) {
- $this->file = file_save_upload('file', $form['file']['#upload_validators'], 'translations://', 0);
+ $this->file = _file_save_upload_from_form($form['file'], $form_state, 0);
// Ensure we have the file uploaded.
if (!$this->file) {