Skip to content

Commit

Permalink
feat(common/cli): file structure api or storage manager (#1045)
Browse files Browse the repository at this point in the history
  • Loading branch information
Davidmattei authored Oct 16, 2024
1 parent c2e8aa2 commit 5d79c2f
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions recipes/websites/file-structure.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down

0 comments on commit 5d79c2f

Please sign in to comment.