diff --git a/cypress/e2e/tables-import.cy.js b/cypress/e2e/tables-import.cy.js index 0312a9623..0875d33fc 100644 --- a/cypress/e2e/tables-import.cy.js +++ b/cypress/e2e/tables-import.cy.js @@ -17,7 +17,7 @@ describe('Import csv', () => { cy.uploadFile('test-import.csv', 'text/csv') cy.loadTable('Tutorial') cy.clickOnTableThreeDotMenu('Import') - cy.get('.modal__content button').contains('Select a file').click() + cy.get('.modal__content button').contains('Select from Files').click() cy.get('.file-picker__files').contains('test-import').click() cy.get('.file-picker button span').contains('Choose test-import.csv').click() cy.get('.modal__content button').contains('Import').click() @@ -32,7 +32,7 @@ describe('Import csv', () => { it('Import csv with upload file button', () => { cy.loadTable('Tutorial') cy.clickOnTableThreeDotMenu('Import') - cy.get('.modal__content button').contains('Upload a file').click() + cy.get('.modal__content button').contains('Upload from device').click() cy.get('input[type="file"]').selectFile('cypress/fixtures/test-import.csv', { force: true }) cy.get('.modal__content button').contains('Import').click() cy.get('[data-cy="importResultColumnsFound"]').should('contain.text', '4') diff --git a/lib/Service/ImportService.php b/lib/Service/ImportService.php index e45851efe..d32efc88c 100644 --- a/lib/Service/ImportService.php +++ b/lib/Service/ImportService.php @@ -112,7 +112,7 @@ public function import(?int $tableId, ?int $viewId, string $path, bool $createMi $error = true; } } - elseif (file_exists($path)) { + elseif (\file_exists($path)) { $spreadsheet = IOFactory::load($path); $this->loop($spreadsheet->getActiveSheet()); } else { diff --git a/src/modules/modals/Import.vue b/src/modules/modals/Import.vue index 7d63e27e7..4432573a7 100644 --- a/src/modules/modals/Import.vue +++ b/src/modules/modals/Import.vue @@ -3,29 +3,31 @@
+ {{ t('tables', 'Supported formats: xlsx, xls, csv, html, xml') }}
+
+ {{ t('tables', 'The first row if the file must contain column headings.') }}
+
{{ t('tables', '⚠️ You don\'t have the permission to create columns.') }}
- - -- {{ t('tables', 'The first row has to contain the column titles.') }} -
-- {{ t('tables', 'Note that imported data will be added to the table. Updating of existing rows is not possible at the moment.') }} -
-- {{ t('tables', 'The possible importing size depends on the system configuration and is only limited by execution time and memory.') }} -
-