> ## Documentation Index
> Fetch the complete documentation index at: https://dokumentation.websale.de/llms.txt
> Use this file to discover all available pages before exploring further.

# Configuration wsupload.config

> Complete sample configuration of the upload module with all sections: message texts, upload settings, purposes, and MIME types.

The `wsupload.config` configuration contains all parameters of the upload module. This page shows a complete sample configuration that you can use as a starting point and explains each section.

You can set some values freely, for example message texts and purposes. Other values, such as the size limits, are enabled for your shop by WEBSALE AG.

> [!WARNING]
>
> This is a sample configuration. Only files with the file formats listed in the `Mime-Type` section can be uploaded.
>
> If you want to allow additional file formats, extend the section accordingly. You can specify multiple comma-separated MIME types per file extension.

Guide: Using the upload module, Integrating the upload module · Basics: Configuration basics

## Where the file is located

You create the file in the Online Service Area in the "Configurations" service for the relevant subshop, with the name `wsupload` and the extension `config`. It's then located in the subshop's configuration directory:

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
konfiguration/<Subshop-ID>/wsupload.config
```

> [!NOTE]
>
> All sections of this file are optional. If a section is missing, the module's built-in default values apply to its area. Only the file itself must exist; otherwise the module logs an error and doesn't work.

## Overview of the sections

| Section | Content |
| - | - |
| `UploadMessages-Txt` | all message and log texts of the module |
| `Settings` | date and time format, allowed file extensions, behavior for rejected files |
| `+FileInfo` | one entry of the purpose selection list per section |
| `Mime-Type` | the allowed MIME types per file extension |
| `Templates` | a different upload template for inquiry mode |

## `UploadMessages-Txt`

In this section, you override the module's texts. Each entry consists of a fixed key and your text.

> [!WARNING]
>
> The key determines which text is overridden. A typo in the key doesn't produce an error message; instead, your text doesn't appear anywhere and the default text remains.

### Setup errors

The buyer only sees these three texts if the integration is incomplete.

| Key | Trigger | Placeholder |
| - | - | - |
| `TemplSectionMissing` | The `Templates` section is missing in the `shop.config` | |
| `UploadTemplMissing` | There's no value for `Upload` in the `Templates` section of the `shop.config` | |
| `UploadTemplFileMiss` | The specified template file doesn't exist | `%s` is replaced by the file name |

### Upload ID and order

| Key | Trigger | Placeholder |
| - | - | - |
| `EmptyUplId` | The buyer hasn't entered an upload ID | |
| `InvalidUplId` | The entered upload ID doesn't exist | |
| `InvalidOrdernumber` | No order exists for the order number, or no upload is intended for its products | |

### Exceeded limits

| Key | Trigger | Placeholder |
| - | - | - |
| `FileSizeExceeded` | The maximum size of a single file has been exceeded | `%d` is replaced by the enabled limit in MB |
| `PosQuotaExceeded` | The maximum data volume per order item has been exceeded | `%d` is replaced by the enabled limit in MB |
| `PosCountExceeded` | The maximum number of files per order item has been exceeded | `%d` is replaced by the enabled limit |

### Disk space

| Key | Trigger | Placeholder |
| - | - | - |
| `LowDiskSpace` | Message to the buyer that no disk space is left | |
| `LowDiskSpaceSubj` | Subject of the email to the configured administrator address | |
| `LowDiskSpaceMail` | Text of this email | `%d` is replaced by the remaining free space in MB |

### File validation

| Key | Trigger | Placeholder |
| - | - | - |
| `InvalidExt` | The file extension isn't allowed | `~validexts~` is replaced by the allowed file extensions |
| `DupFile` | The file has already been uploaded | `~filename~` is replaced by the file name |

### Usage hints

| Key | Trigger |
| - | - |
| `SafariHint` | special note for Safari users about the transfer process |
| `TransferRunning` | a transfer is already in progress |
| `DelConfirm` | confirmation prompt before deleting selected files |
| `Files` | label for the number of files |

### Log table texts

These texts appear in the log that the module keeps for each upload process.

| Key | Meaning |
| - | - |
| `LogType_upload` | file uploaded |
| `LogType_delete` | file deleted |
| `LogType_uploaddupfile` | file already existed |
| `LogType_finished` | uploads completed |
| `LogType_unlocked` | completion revoked |
| `LogType_filelimit` | maximum size per file exceeded |
| `LogType_limitmb` | maximum size per order item exceeded |
| `LogType_poslimitcount` | maximum number of files per order item exceeded |
| `LogType_uploaderror` | incomplete data upload |

## `Settings`

| Parameter | Purpose | Values |
| - | - | - |
| `DateFormat` | format of dates in the module | format characters of the C function `strftime`, for example `%d.%m.%Y` |
| `TimeFormat` | format of times | format characters of the C function `strftime`, for example `%H:%M` |
| `Extensions` | allowed file extensions as a comma-separated list | for example `JPG,PDF,ZIP`. If not specified, all extensions are allowed |
| `VS4UploadWorkaround` | transfer workaround for older virus scanner integrations | `yes`, `no`. Default: `no` |
| `ShowErrorOnMimeTypeMismatch` | whether the buyer sees an error message if the MIME type doesn't match | `yes`, `no`. Default: `no` |
| `ShowErrorOnVirusDetection` | whether the buyer sees an error message if the virus scan triggers | `yes`, `no`. Default: `no` |

> [!NOTE]
>
> For the three switches, any value other than `yes` counts as `no`. So a typo silently disables the function.
>
> `Extensions` is an allowlist and works independently of the MIME check. Remember both spellings of common extensions, for example `TIF` and `TIFF`.

Guide: Integrating the upload module, step 5 explains how the two error switches interact

## `+FileInfo`

Optionally, the buyer can specify a purpose for each file from a selection list. Each `+FileInfo` section is one entry in this list.

| Parameter | Purpose |
| - | - |
| `Caption` | the label the buyer sees |
| `Code` | the value stored with the file |

The order of the sections in the file is the order in the selection list. So put the neutral entry at the top.

## `Mime-Type`

Here you enter pairs of file extension and expected MIME type. You can list multiple comma-separated types per file extension.

> [!WARNING]
>
> File formats not listed here can't be uploaded. An incomplete list therefore blocks legitimate files.

> [!NOTE]
>
> The module determines the actual MIME type from the file content, not from what the browser reports. That's why a renamed file is detected.
>
> The check only runs if the section contains any entries at all. An empty or missing section disables it. Case doesn't matter in the comparison, and spaces around the comma-separated types are removed.

## `Templates`

| Parameter | Purpose |
| - | - |
| `Upload` | name of the upload template for inquiry mode |

This section is missing from the sample configuration but is evaluated by the module. You only need it if you use the upload module in a form with the inquiry module. For uploads to orders, the template is specified in the `Templates` section of the `shop.config`.

Guide: Upload module for forms with inquiry

## Sample configuration

Copy the following content into your configuration file and adjust it. The comments after the `#` explain each entry and can remain in place.

```ini theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
###############################################################################
# Fehlermeldungs-Texte und Texte der Logging-Tabelle
###############################################################################

<UploadMessages-Txt>
TemplSectionMissing   = In der shop.config fehlt der Abschnitt <Templates>
UploadTemplMissing    = In der shop.config ist kein Wert für den Tag Upload im Abschnitt <Templates> eingetragen
UploadTemplFileMiss   = Die Template-Datei '%s' ist nicht vorhanden
EmptyUplId            = Sie haben keine Upload-ID eingegeben. Diese benötigen wir, um den Datenupload Ihrer Bestellung zuordnen zu können. Ihre Upload-ID finden Sie in der Bestellbestätigung, die wir Ihnen per E-Mail zugesandt haben.
InvalidUplId          = Diese Upload-ID konnte leider nicht gefunden werden. Bitte überprüfen Sie Ihre Eingabe. Ihre Upload-ID finden Sie in der Bestellbestätigung, die wir Ihnen per E-Mail zugesandt haben.
InvalidOrdernumber    = Für die angegebene Ordernumber existiert keine Bestellung oder für die Produkte der Bestellung ist kein Upload vorgesehen
FileSizeExceeded      = Es können nur Dateien bis zu einer Größe von %d MB hochgeladen werden
PosQuotaExceeded      = Für eine Bestellposition kann nicht mehr als %d MB hochgeladen werden
PosCountExceeded      = Für eine Position können nicht mehr als %d Dateien hochgeladen werden
LowDiskSpace          = Auf dem Ziellaufwerk ist nicht mehr genügend Speicherplatz vorhanden. Bitte setzen Sie sich mit dem Shopbetreiber in Verbindung oder versuchen Sie den Upload später nochmal.
LowDiskSpaceSubj      = Upload-Funktion deaktiviert
LowDiskSpaceMail      = Auf dem Ziellaufwerk für die Upload-Dateien sind weniger als %d MB frei, weitere Uploads sind deshalb nicht möglich. Bitte löschen Sie vorhandene Upload-Dateien oder setzen Sie sich mit der WEBSALE-AG in Verbindung.
InvalidExt            = Ungültige Dateiendung: (erlaubt sind: ~validexts~)
DupFile               = Die Datei '~filename~' wurde bereits hochgeladen. Falls sie die bereits existierende Datei überschreiben möchten, löschen Sie sie bitte vorher heraus.
SafariHint            = HINWEIS FÜR SAFARI-NUTZER: Die Übertragung wird gestartet, nachdem Sie auf "OK" geklickt haben. Bitte warten Sie anschließend, bis in der Liste der bereits übertragenen Dateien der Dateiname angezeigt wird.
TransferRunning       = Übertragung läuft bereits
DelConfirm            = Wollen Sie die markierten Dateien wirklich löschen?
Files                 = Datei(en)
LogType_delete        = Datei gelöscht
LogType_upload        = Datei hochgeladen
LogType_uploaddupfile = Datei bereits vorhanden
LogType_finished      = Uploads abgeschlossen
LogType_unlocked      = Abschluss aufgehoben
LogType_filelimit     = Maximale Größe je Datei überschritten
LogType_poslimitcount = Maximale Anzahl von Dateien je Bestellposition überschritten
LogType_limitmb       = Maximale Größe je Bestellposition überschritten
LogType_uploaderror   = Unvollständiger Datenupload
</UploadMessages-Txt>

###############################################################################
# Upload-Einstellungen
###############################################################################

<Settings>
DateFormat                  = %d.%m.%Y                        # Datums-Format (Format siehe C-Funktion "strftime")
TimeFormat                  = %H:%M                           # Zeit-Format (Format siehe C-Funktion "strftime")
Extensions                  = JPG,JPEG,TIFF,PDF,ZIP,RAR,TXT,TIF   # Zulässige Dateiendungen (kommagetrennt). Ohne Angabe sind alle Formate zulässig
VS4UploadWorkaround         = no
ShowErrorOnMimeTypeMismatch = no                              # yes|no, Standard: no
ShowErrorOnVirusDetection   = no                              # yes|no, Standard: no
</Settings>

###############################################################################
# Verwendungszweck
# Optional kann für jede Datei ein Verwendungszweck übermittelt werden,
# der aus einer Auswahlliste gewählt wird.
###############################################################################

<+FileInfo>
Caption = Bitte wählen Sie
Code    = 0
</+FileInfo>

<+FileInfo>
Caption = Alles in einem Dokument
Code    = 1
</+FileInfo>

<+FileInfo>
Caption = Vorderseite
Code    = 2
</+FileInfo>

<+FileInfo>
Caption = Rückseite
Code    = 3
</+FileInfo>

###############################################################################
# MIME-Types
# Eingetragen werden Paare aus Dateiendung und erwartetem MIME-Type.
# Je Dateiendung können mehrere MIME-Types kommasepariert eingetragen werden.
# Achtung: Dateiformate, die hier nicht aufgeführt werden,
# können nicht hochgeladen werden.
###############################################################################

<Mime-Type>
JPG  = image/jpeg
JPEG = image/jpeg
eps  = image/x-eps
png  = image/png
TIF  = image/tiff
TIFF = image/tiff
PDF  = application/pdf
doc  = application/msword
docx = application/vnd.openxmlformats-officedocument.wordprocessingml, application/msword
odt  = application/vnd.oasis.opendocument.text
xls  = application/vnd.ms-excel
pub  = application/x-mspublisher
ppt  = application/vnd.ms-powerpoint
TXT  = text/plain

# Archive
ZIP = application/zip
RAR = application/rar
</Mime-Type>
```

> [!NOTE]
>
> The extension lists in the `Settings` and `Mime-Type` sections of the sample configuration don't match, for example `JPEG` versus `eps`, `png`, and the Office formats. Align both lists before you put the configuration into production.


## Related topics

- [Configuration: fundamentals](https://dokumentation.websale.de/en/v8s/grundlagen-konfiguration/konfiguration-grundlagen.md)
- [Configuration osb.config](https://dokumentation.websale.de/en/v8s/referenz/konfigurationen/konfiguration-osb-config.md)
- [Configuration types](https://dokumentation.websale.de/en/v8s/grundlagen-konfiguration/konfigurations-typen.md)
- [Shop configuration global.config](https://dokumentation.websale.de/en/v8s/referenz/konfigurationen/shopkonfiguration-global-config.md)
- [Rating configuration prodrating.config](https://dokumentation.websale.de/en/v8s/referenz/konfigurationen/bewertungskonfiguration-prodrating-config.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.