Bynder 2 

EXT:bynder2 is a TYPO3 extension that provides integration with Bynder (https://www.bynder.com/) by registering a TYPO3 FAL (File Abstraction Layer) driver. This extension offers the following features:

  • Seamlessly browse your Bynder assets within the TYPO3 file list module.
  • Search and sort your Bynder assets directly in the file list module.
  • Utilize Bynder assets across various TYPO3 content records.
  • Take advantage of TYPO3’s cropping and resizing functionalities for Bynder assets.

Installation 

Explains how to install this extension in Composer-based and Classic TYPO3 installations.

Configuration 

Learn how to configure this extension.

Known Problems 

Learn how to solve known problems.

Upgrade 

How to upgrade bynder2 from earlier versions.

Administrator manual 

This chapter describes how to manage the extension from a superuser point of view.

Upgrade Guide 

If you are updating the TYPO3 extension EXT:bynder2 to a newer version, please ensure you read this section attentively to avoid potential issues.

Upgrade to Version 2.0.0 

This version introduces support for the new OAuth 2.0 authentication system. As a result, all existing credentials stored in the file storage configuration are no longer valid.

Steps to Upgrade:

  1. Update your Bynder application to use OAuth 2.0, or alternatively, create a new application in Bynder configured for OAuth 2.0.
  2. Input the new OAuth 2.0 credentials into the Bynder file storage record within your TYPO3 installation.

Upgrade to Version 1.0.5 

In this version, the bynder2 cache has been divided into two distinct cache tables:

  • bynder2_fileinfo
  • bynder2_pagenav

Steps to Upgrade:

  1. Update your database schema to accommodate the new cache tables.
  2. Remove the outdated bynder2 cache tables from your database.

Upgrade to Version 1.0.0 

This was the initial release of the extension. No specific updates are required.

ChangeLog 

Version 4.0.2 Release Notes 

  • Resolve unavailable image path using absolute file path

Version 4.0.1 Release Notes 

  • Detect mime type of files via MimeTypeDetector

Version 4.0.0 Release Notes 

  • Compatibility: Add full TYPO3 v13 LTS support and compatibility improvements
  • Features:

    • Implement sorting by crdate DESC for Bynder FileBrowser
    • Mark Bynder Driver as read-only to avoid unwanted modifications
    • Add support for processing Bynder URLs using new ImageProcessingInstructions
    • Set processed file records as non-executed to prevent saving them in sys_file_processedfile
    • Set Bynder CDN URLs to read-only for data integrity
    • Add .editorconfig for consistent code formatting
    • Add documentation for Content Security Policy (CSP) headers including PHP example
    • Improve event listener documentation with additional explanation
  • Bugfixes:

    • Repair download mechanism and introduce local processing fallback
    • Fix query handling in SysFileRepository to support remote driver use cases
    • Delete missing remote files during synchronization to maintain consistency
    • Ensure correct sorting using creation date when browsing Bynder assets
  • Code Quality:

    • Apply TYPO3 Core Coding Guidelines (CGL)
    • Apply PHPStan fixes for static analysis compliance
    • Clean up codebase and streamline unit tests
  • Maintenance:

    • Update README badges
    • Migrate documentation to guides.xml format
    • Integrate TYPO3 Testing Framework

Version 3.0.0 Release Notes 

  1. Compatibility Enhancements

    • Added compatibility for TYPO3 version 12.
    • Removed support for older TYPO3 versions to streamline future development.
  2. File Synchronization

    • File synchronization will now exclusively be handled via scheduler tasks to enhance stability and reduce complexity.
  3. Performance Improvements

    • Implemented CDN thumbnail (mini) from Bynder for backend previews, significantly improving preview performance.
    • Utilized CDN thumbnail (webimage) from Bynder for public URLs in the backend, ensuring faster and more reliable access.
  4. Technical Updates

    • Switched the Bynder driver to use the sys_file table as a foundational data source.
    • Converted the fileinfo cache to a transient cache. This cache now facilitates the transfer of file responses between objects without long-term storage.
  5. Deprecated Features

    • Removed page navigation cache (pagenav cache) functionality to improve responsiveness and adaptability.

Version 2.0.4 Release Notes 

  • Add BynderServiceFactory to simplify DI

Version 2.0.3 Release Notes 

  • Exclude .github folder in .gitattributes
  • Update .gitignore file

Version 2.0.2 Release Notes 

  • Add logger to BynderService and SyncBynderFilesCommand
  • Add specific log file for EXT:bynder2
  • Use PHP generator/yield to reduce memory while retrieving thousands of files
  • Inject TYPO3 Guzzle config from TYPO3_CONF_VARS/HTTP to BynderClient

Version 2.0.1 Release Notes 

  • Update ext icon
  • Update title in documentation
  • Remove minimal example from documentation

Version 2.0.0 Release Notes 

  • Update to new Bynder PHP SDK
  • Make use of new OAuth 2.0 authorization

Version 1.0.7 Release Notes 

  • Move all bynder calls into its own BynderService
  • Catch various Exceptions of Bynder calls
  • Better usage of caches
  • Use FAL indexer to fetch all files and mark missing ones
  • Add OrderingUtility

Version 1.0.6 Release Notes 

  • Clear the two new caches in sync command

Version 1.0.5 Release Notes 

  • Use 2 caches to differ between pagenav and fileinfo cache

Version 1.0.4 Release Notes 

  • Add option to use transient cache to retrieve most current files

Version 1.0.3 Release Notes 

  • Add option to set number of files in file browser
  • Add functional tests

Version 1.0.0 Release Notes 

  • Initial upload
  • Only TYPO3 10 compatibility
  • Supports only OAuth 1

Configuration 

Content Security Policies 

Starting with TYPO3 13, Content Security Policy (CSP) is enabled by default for the TYPO3 backend. Therefore, a specific configuration is required; otherwise, images and thumbnails will not be displayed or available for download.

Since the URLs differ for each Bynder customer, you will need to provide the following configuration with your respective URL values in your TYPO3 SitePackage.

EXT:my_extension/Configuration/ContentSecurityPolicies.php

<?php

declare(strict_types=1);

use TYPO3\CMS\Core\Security\ContentSecurityPolicy\Directive;
use TYPO3\CMS\Core\Security\ContentSecurityPolicy\Mutation;
use TYPO3\CMS\Core\Security\ContentSecurityPolicy\MutationCollection;
use TYPO3\CMS\Core\Security\ContentSecurityPolicy\MutationMode;
use TYPO3\CMS\Core\Security\ContentSecurityPolicy\Scope;
use TYPO3\CMS\Core\Security\ContentSecurityPolicy\UriValue;
use TYPO3\CMS\Core\Type\Map;

return Map::fromEntries(
    [
        Scope::backend(),

        new MutationCollection(
            new Mutation(
                MutationMode::Extend,
                Directive::ImgSrc,
                new UriValue('https://medienpool.example.com'),
                new UriValue('https://sub-domain.cloudfront.net'),
            ),
            new Mutation(
                MutationMode::Extend,
                Directive::FrameSrc,
                new UriValue('https://medienpool.example.com'),
                new UriValue('https://sub-domain.cloudfront.net'),
            ),
        ),
    ],
);
Copied!

Storage Record 

Configure Bynder Storage 

Permanent Token 

Follow this configuration path, if you have a permanent token available. You can request a permanent token from Bynder Support: https://support.bynder.com/hc/en-us/articles/360013875300-Permanent-Tokens

  1. Create new file storage

    Create new file storage record sys_file_storage on root page (page with UID 0) and give it a name.

  2. Storage type

    Switch storage type to Bynder

  3. Add Bynder domain

    Set Bynder domain. Example: domain.bynder.com

  4. Permanent Token

    Set permanent token you have get from Bynder Support

  5. Set temporary folder

    bynder2 can not write files to Bynder, so you have to use another folder for temporary files. Please set Folder for manipulated and temporary images etc. to something like 1:/_processed_/.

Access Token 

If you don't have access to permanent tokens you have to configure Bynder storage with access token.

  1. Create new file storage

    Create new file storage record sys_file_storage on root page (page with UID 0) and give it a name.

  2. Storage type

    Switch storage type to Bynder

  3. Add Bynder domain

    Set Bynder domain. Example: domain.bynder.com

  4. Add Redirect Callback

    Set redirect callback. It must be exactly the same value you have set in your Bynder App. We prefer to set this value to something like https://[yourDomain]/typo3/index.php in your Bynder App.

  5. Add Client ID

    Set Client ID. You will find this value in your Bynder App.

  6. Add Client Secret

    Set Client Secret. You will find this value in your Bynder App.

  7. Save

    Save record. That will update the authorization link for Bynder App.

  8. Authorization

    Click the link to authorize the Bynder App. Maybe you have to login to Bynder. You will automatically redirected to the configured Redirect Callback URL in a new browser tab.

  9. Copy, copy, copy

    Copy access token, refresh token and expires into your bynder storage record in the other browser tab.

  10. Set temporary folder

    bynder2 can not write files to Bynder, so you have to use another folder for temporary files. Please set Folder for manipulated and temporary images etc. to something like 1:/_processed_/.

  11. Save

    Click save. That will try to call the Bynder API the first time.

  12. Check

    If everything works you should now see the Bynder Status at the bottom of your new bynder storage record.

Extension Settings 

Some general settings for bynder2 can be configured in Admin Tools -> Settings.

Tab: Basic 

numberOfFilesInFileBrowser 

Default: 100 Maximum: 1000 (This is a limit of Bynder API)

With this option you can set the number of files which should be initially be loaded in FileBrowser, the PopUp window to choose files from.

This setting is not valid for module filelist.

Installation 

Install with Composer 

Install the extension via Composer:

composer req jweiland/bynder2
Copied!

Install in Classic Mode 

On non composer based TYPO3 installations you can install EXT:bynder2 still over the ExtensionManager:

  1. Login

    Login to backend of your TYPO3 installation as an administrator or system maintainer.

  2. Open ExtensionManager

    Click on Extensions from the left menu to open the ExtensionManager.

  3. Update Extensions

    Choose Get Extensions from the upper selectbox and click on the Update now button at the upper right.

  4. Install EXT:bynder2

    Use the search field to find bynder2. Choose the bynder2 line from the search result and click on the cloud icon to install bynder2.

Next step 

Configuration.

Known Problems 

Missing Files in the Filelist Module 

Starting from version 3.0.0, not all files are synchronized when accessing the Filelist module to address performance concerns. To ensure your files are displayed, please set up a new scheduler task. Select "Execute Console Command," choose "fal:bynder:sync," and configure the remaining options according to your requirements. Once the scheduler task has been successfully executed, your Bynder files will appear in the Filelist module.

Performance 

Within the Configuration tab, at the bottom of the settings list, you will find the option Folder for manipulated and temporary images etc.

By default, this folder is located within the Bynder file storage. As a result, all processed or temporary images are transferred via the Bynder API, which significantly impacts performance due to the slow transfer rates.

To improve rendering speed and overall performance, it is recommended to relocate this folder to a fast local file storage. For example, if your fileadmin storage has the storage UID 1, you can set the value to: 1:/_processed_/bynder2. This ensures that temporary files are handled locally rather than being transferred through the Bynder API.

Attention! 

Cleanup required after changing the processed folder storage.

After changing the Folder for manipulated and temporary images to a local file storage (e.g., UID 1 for fileadmin), it is necessary to clean up existing processed files.

Specifically, all records in the sys_file_processedfile table that reference the previous Bynder storage (e.g., UID 2) must be deleted. Otherwise, TYPO3 may continue to reference outdated processed files stored in the remote storage.

For further details, refer to the related TYPO3 issue: https://forge.typo3.org/issues/84069