Checkfaluploads 

Extension key

checkfaluploads

Package name

jweiland/checkfaluploads

Version

main

Language

en

Author

Stefan Froemken

License

This document is published under the Creative Commons BY 4.0 license.

Rendered

Thu, 11 Dec 2025 16:33:57 +0000


With checkfaluploads we will add a new checkbox to filelist module and ElementBrowser where the user gives unrestricted rights to the owner for the uploaded files. ----

Table of Contents:

Introduction 

What does it do? 

With checkfaluploads we will add a new checkbox to filelist module and ElementBrowser where the user gives unrestricted rights to the owner for the uploaded files. Further the UID of the image uploading editor will be added to the sys_file record, so an admin can see who has uploaded a file in history.

Users Manual 

While uploading files in filelist module or in ElementBrowser you will see a new checkbox to confirm all file rights to the given owner. If you do not check this checkbox the file upload will fail.

If a file was uploaded successfully, your user UID will be assigned to the uploaded files.

Installation 

Composer 

If your TYPO3 installation works in composer mode, please execute following command:

composer req jweiland/checkfaluploads
vendor/bin/typo3 extension:setup --extension=checkfaluploads
Copied!

If you work with DDEV please execute this command:

ddev composer req jweiland/checkfaluploads
ddev exec vendor/bin/typo3 extension:setup --extension=checkfaluploads
Copied!

ExtensionManager 

On non composer based TYPO3 installations you can install checkfaluploads 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 checkfaluploads

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

Next step 

Configure checkfaluploads.

Configuration 

Extension Settings 

Owner 

If you upload files you have to activate a checkbox to give an owner unrestricted rights to the uploaded files. The owner in the label is a placeholder and can be set in Extension Settings.

Developer manual 

Additional columns 

checkfaluploads adds two columns to table sys_file:

cruser_id

This column will be filled automatically by checkfaluploads in TYPO3 BE context.

fe_cruser_id

This column will be automatically filled by the current logged in FE user, as long as you use the officially TYPO3 API for FAL files. In any other cases you have to fill this column on your own.

FalUploadService 

We deliver a little API you can use in your own Extension to check, if an uploaded file from FE context has the user rights checkbox marked. Add checkbox to your Fluid Template:

Checkbox via Fluid 

<f:form.checkbox property="logo.0.rights"
                 id="logoRights"
                 class="form-check-input"
                 value="1" />
Copied!

Somewhere in your extbase extension you should have an UploadTypeConverter. Add following lines:

if (
    ExtensionManagementUtility::isLoaded('checkfaluploads')
    && $error = GeneralUtility::makeInstance(FalUploadService::class)->checkFile($uploadedFile)
) {
    return $error;
}
Copied!

Checkbox via YAML EXT:form 

-
  label: 'Example image upload'
  type: ImageUpload
  identifier: image-1
  properties:
    saveToFileMount: '1:/Extensions/[myExt]'
    allowedMimeTypes:
    - image/jpg
    - image/jpeg
    - image/png
    elementDescription: 'Select an image'
-
  type: Checkbox
  identifier: image-1-userrights
  label: 'Upload Rights'
  properties:
    # non-official property. Needed by DynamicUploadValidatorHook. Helps to identify the checkbox
    checkboxType: uploadRights
    # non-official property. Enter the identifier of the image/file upload
    referenceUploadIdentifier: image-1
  validators:
  # Do not add NotEmpty validator. It will be added dynamically in DynamicUploadValidatorHook
Copied!

ViewHelpers 

ImageRightsMessageViewHelper 

This ViewHelper reads the owner property of checkfaluploads extension settings and implements the owner into a localized string. That way you can build a text like "I give all image rights to jweiland.net".

<c:imageRightsMessage />
Copied!

Or inline style:

{c:imageRightsMessage()}
Copied!

If you want you can use your own translation of your own extension. In that case be sure you have added %s as placeholder into your message of locallang.xlf.

<c:imageRightsMessage languageKey="myOwnImageRightsLanguageKey" extensionName="myExtKey" />
Copied!

Known Problems 

No user in CLI mode 

We only set FE or BE user in frontend or backend mode. As the user for CLI mode is always the same one and only user, it does not make sense to add that user as creator or editor to any files.

ChangeLog 

Version 5.0.2 

  • Migrate old getScriptUlr() method

Version 5.0.1 

  • Update testing directory

Version 5.0.0 

  • [TASK] TYPO3 Compatibility fix for 13 LTS
  • [TASK] Removed / Replaced deprecated functions
  • [TASK] Removed TYPO3 12 Compatibility

Version 4.0.3 

  • [BUGFIX] Do not try to add user information to images in CLI mode.

Version 4.0.2 

  • Use correct var in annotation of DynamicUploadValidatorHookTest

Version 4.0.1 

  • Exclude .crowdin.yml while packaging

Version 4.0.0 

  • Add TYPO3 12 compatibility
  • Remove TYPO3 10 compatibility
  • Remove TYPO3 11 compatibility
  • Change ext icon
  • BUGFIX: Do not upload files on validation error in EXT:form

Version 3.0.4 

  • Test for existing user record before accessing user record array

Version 3.0.3 

  • Add image rights checkbox in replace file form

Version 3.0.2 

  • Check also for image rights while replacing a file (API only)

Version 3.0.1 

  • Update func tests
  • Update Readme.md
  • Move labelForUserRights to ExtConf object
  • Add userHasRights checkbox to FileBrowser PopUp
  • Add further description to EventListerner in Services.yaml

Version 3.0.0 

  • Remove TYPO3 9 compatibility
  • Add TYPO3 11 compatibility
  • Set hook classes as public in Services.yaml
  • Prevent GU::makeInstance where possible
  • Add tests for TYPO3 11
  • Migrate from SignalSlots to EventListeners
  • Use ExtensionConfiguration as constructor argument
  • Remove clearcacheonload from ext_emconf.php

Version 2.2.1 

  • Update .gitattributes
  • Update .gitignore
  • Update .editorconfig
  • Update structure of documentation

Version 2.2.0 

  • Update documentation for upload rights checkbox
  • Add hook to add dynamic validator for upload rights checkbox

Version 2.1.1 

  • Do not load inline language file on AJAX requests based on pageType

Version 2.1.0 

  • Add new ViewHelper to generate an image user rights message for checkboxes in Fluid templates
  • Add Unit- and FunctionalTest

Version 2.0.0 

  • Remove TYPO3 8.7 compatibility
  • Add TYPO3 10.4 compatibility
  • Make owner in label configurable
  • Merge Hooks into one file
  • Use TYPO3 Messages for better visibility in filelist
  • Add little API to check uploads against marked user rights checkbox

Sitemap