diff --git a/src/Oro/Bundle/ImportExportBundle/Migrations/Schema/OroImportExportBundleInstaller.php b/src/Oro/Bundle/ImportExportBundle/Migrations/Schema/OroImportExportBundleInstaller.php index 9d9925b864c..9e90e9559f1 100644 --- a/src/Oro/Bundle/ImportExportBundle/Migrations/Schema/OroImportExportBundleInstaller.php +++ b/src/Oro/Bundle/ImportExportBundle/Migrations/Schema/OroImportExportBundleInstaller.php @@ -14,7 +14,7 @@ class OroImportExportBundleInstaller implements Installation */ public function getMigrationVersion() { - return 'v1_1'; + return 'v1_0'; } /** diff --git a/src/Oro/Bundle/ImportExportBundle/Migrations/Schema/v1_1/MoveImportExportFiles.php b/src/Oro/Bundle/ImportExportBundle/Migrations/Schema/v1_1/MoveImportExportFiles.php deleted file mode 100644 index 882ecac33a0..00000000000 --- a/src/Oro/Bundle/ImportExportBundle/Migrations/Schema/v1_1/MoveImportExportFiles.php +++ /dev/null @@ -1,51 +0,0 @@ -container = $container; - } - - /** - * {@inheritdoc} - */ - public function up(Schema $schema, QueryBag $queries) - { - $newFolder = - $this->container->getParameter('kernel.root_dir') . DIRECTORY_SEPARATOR . - $this->container->getParameter('importexport.filesystems_storage'); - - $oldFolder = $this->container->getParameter('kernel.cache_dir') . '/import_export'; - - if (is_dir($oldFolder) && is_dir($newFolder)) { - $oldFolder .= DIRECTORY_SEPARATOR; - $newFolder .= DIRECTORY_SEPARATOR; - foreach (scandir($oldFolder) as $file) { - if (is_file($oldFolder . $file) && is_readable($oldFolder . $file)) { - copy($oldFolder . $file, $newFolder . $file); - @unlink($oldFolder . $file); - } - } - } - } -} diff --git a/src/Oro/Bundle/ImportExportBundle/Resources/config/file.yml b/src/Oro/Bundle/ImportExportBundle/Resources/config/file.yml index 722d5702654..1ed499d2675 100644 --- a/src/Oro/Bundle/ImportExportBundle/Resources/config/file.yml +++ b/src/Oro/Bundle/ImportExportBundle/Resources/config/file.yml @@ -3,14 +3,13 @@ parameters: oro_importexport.file.mime_type_guesser.class: Oro\Bundle\ImportExportBundle\MimeType\MimeTypeGuesser oro_importexport.file.split_csv_file.class: Oro\Bundle\ImportExportBundle\File\SplitterCsvFile oro_importexport.file.split_csv_file.size_of_batch: 100 - importexport.filesystems_storage: '../var/import_export' services: oro_importexport.file.file_system_operator: class: %oro_importexport.file.file_system_operator.class% arguments: - - '%kernel.root_dir%' - - '%importexport.filesystems_storage%' + - %kernel.cache_dir% + - "import_export" oro_importexport.file.mime_type_guesser: class: %oro_importexport.file.mime_type_guesser.class% @@ -19,5 +18,5 @@ services: class: %oro_importexport.file.split_csv_file.class% arguments: - '@oro_importexport.reader.csv' - - '%kernel.root_dir%/%importexport.filesystems_storage%' + - '%kernel.cache_dir%/import_export' - '%oro_importexport.file.split_csv_file.size_of_batch%' diff --git a/src/Oro/Bundle/ImportExportBundle/Resources/doc/reference/how-to-use.md b/src/Oro/Bundle/ImportExportBundle/Resources/doc/reference/how-to-use.md index 604a3be768e..4fa038a13c2 100644 --- a/src/Oro/Bundle/ImportExportBundle/Resources/doc/reference/how-to-use.md +++ b/src/Oro/Bundle/ImportExportBundle/Resources/doc/reference/how-to-use.md @@ -10,8 +10,7 @@ Table of Contents - [Import Processor](#import-processor) - [Fixture Services](#fixture-services) - [Import and export UI setup](#import-and-export-ui-setup) - - [Storage configuration](#storage-configuration) - + Adding Normalizers ------------------ @@ -524,9 +523,3 @@ class CustomExportTypeExtension extends AbstractTypeExtension } } ``` -Storage configuration ----------------- - -OroImportExportBundle uses local storage for providing a filesystem. - -By default, it configured to store files in `var/import_export directory` of your project. You can change this in `parameters.yml` - variable `importexport.filesystems_storage`. \ No newline at end of file