https://github.com/daniellienert/dl-assetsync
Sync assets from various sources (like the local filesystem, dropbox, owncloud ...) into Neos.
https://github.com/daniellienert/dl-assetsync
assets dropbox neoscms owncloud webdav
Last synced: 10 months ago
JSON representation
Sync assets from various sources (like the local filesystem, dropbox, owncloud ...) into Neos.
- Host: GitHub
- URL: https://github.com/daniellienert/dl-assetsync
- Owner: daniellienert
- License: mit
- Created: 2017-03-19T18:22:01.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-04-30T15:53:49.000Z (about 3 years ago)
- Last Synced: 2025-04-12T23:13:05.140Z (about 1 year ago)
- Topics: assets, dropbox, neoscms, owncloud, webdav
- Language: PHP
- Homepage:
- Size: 77.1 KB
- Stars: 10
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.org/daniellienert/dl-assetsync) [](https://packagist.org/packages/dl/assetsync) [](https://packagist.org/packages/dl/assetsync) [](https://packagist.org/packages/dl/assetsync)
[](https://www.amazon.de/hz/wishlist/ls/MSNQT8FTAMT5?ref_=wl_share)
# Neos Asset Synchronization
This package makes it possible to sync files from various sources into the Neos asset management. Sources can be a folder on the local file system as well as cloud services like NextCloud or Dropbox. New sync sources can be added easily. You can specify tags that are assigned to the importet assets in order to find them easily in the media browser.
### Available Sources
These are currently available sources, new sources can be implemented easily - take a look at the `SourceInterface` to see how its done.
These are the available sources. Have a look at the detailed configuration examples bewlow.
- **Local Filesystem Source**: Import files from a local folder.
- **WebDav Source**: Import files from a webdav server. Also suitable to sync files from your **Owncloud** or **Nextcloud** account.
- **Dropbox Source**: Import files from a Dropbox folder.
## Installation and integration
The installation is done with composer:
composer require dl/assetsync
An additional database table is required which is created using:
./flow doctrine:migrate
## Usage
Run the synchronization via the command controller:
./flow assetsync:sync
Or run all available sourceConfiguration:
./flow assetsync:syncall
## Source Configuration
### Generic Source configuration
**sourceClass**
Full qualified class name of the source class.
**fileIdentifierPattern**
This pattern can be used to filter the to be imported files by a given pattern. Currently the file identifier is the filename and path for all implemented sources.
This can change for new sources.
Example:
fileIdentifierPattern: '.+\.(gif|jpg|jpeg|tiff|png)'
Default: `.*`
**removeAssetsNotInSource**
Configures, if files which are synced in previously, but doesn't exist in the source anymore should be removed from the assets.
Default: `false`
### Local Filesystem Source
Syncs files from a local file system directory.
| Implementation | `DL\AssetSync\Source\LocalFilesystemSource` |
|------------------|---------------------------------------------|
| Required Package | none |
Configuration Example:
DL:
AssetSync:
sourceConfiguration:
:
sourceClass: DL\AssetSync\Source\LocalFilesystemSource
assetTags:
- myLocalFileSource
assetCollections:
- assetCollectionWithSyncedItems
sourceOptions:
sourcePath: ''
### WebDav Source
Syncs files from a WebDav Server. This can also be used to sync files from OwnCloud or NextCloud. It uses the packages League\Flysystem for an easier file system abstraction.
| Implementation | `DL\AssetSync\Source\LeagueFlysystem\WebDavSource` |
|------------------|----------------------------------------------------|
| Required Package | `league/flysystem-webdav` |
Configuration Example for a OwnCloud share:
DL:
AssetSync:
sourceConfiguration:
:
sourceClass: DL\AssetSync\Source\LeagueFlysystem\WebDavSource
sourceOptions:
baseUri: '/remote.php/webdav/'
pathPrefix: '/remote.php/webdav'
userName: ''
password: ''
authType: 1
sourcePath: ''
### Dropbox Source
Syncs files from Dropbox. You need to create an application to retreive the app key on [https://www.dropbox.com/developers/apps]().
| Implementation | `DL\AssetSync\Source\LeagueFlysystem\DropboxSource` |
|------------------|-----------------------------------------------------|
| Required Package | `league/flysystem-dropbox` |
Configuration Example for Dropbox:
dropboxSource:
sourceClass: DL\AssetSync\Source\LeagueFlysystem\DropboxSource
sourceOptions:
sourcePath: ''
accessToken:
appSecret: