From 5d79c2fb02decf5a99cb70754bb696caabf654c7 Mon Sep 17 00:00:00 2001 From: David mattei Date: Wed, 16 Oct 2024 08:45:26 +0200 Subject: [PATCH] feat(common/cli): file structure api or storage manager (#1045) --- recipes/websites/file-structure.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/recipes/websites/file-structure.md b/recipes/websites/file-structure.md index 4031c1b..e743829 100644 --- a/recipes/websites/file-structure.md +++ b/recipes/websites/file-structure.md @@ -1,22 +1,29 @@ # File structure -## Push a local folder to ElasticMS +## Push a local folder to ElasticMS or Storage + +The following commands is available in all ElacticMS applications (Admin, Web and CLI). -The following command is available in all ElacticMS applications (Admin, Web and CLI) but required that your are logged in first (`ems:admin:login`). ```shell -php bin/console ems:file-structure:push ../../demo +php bin/console ems:file-structure:push ../../demo --admin ``` This command will upload all files present in the ../../demo folder an give you an hash as output. That hash identify an ElasticMS Archive, it's a JSON containing the all files structure (with hash, filename, size and mimetype of all files). +The admin option requires api authentication, first run `ems:admin:login`. +Without the admin option, it will use the application storages defined in `EMS_STORAGES`. + ## Update a local folder from ElasticMS ```shell -php bin/console ems:file-structure:pull d3bb0298fd9a69743333fb25dbe6cdefdc834ff2 ../../demo +php bin/console ems:file-structure:pull d3bb0298fd9a69743333fb25dbe6cdefdc834ff2 ../../demo --admin ``` Update the folder ../../demo by the content of the ElasticMS archive identified by the hash `d3bb0298fd9a69743333fb25dbe6cdefdc834ff2`. +The admin option requires api authentication, first run `ems:admin:login`. +Without the admin option, it will use the application storages defined in `EMS_STORAGES`. + ## Publish a file structure to a S3 bucket There is another command that allows you to publish an ElasticMS archive into a S3 bucket.