Files

Files

The <files> XML element is used to pass one or more files (encoded in base64) to or from API endpoints. Files may include design files, TrueView™ images, or other related assets in requests and responses.


XML structure

<files>                                           <!-- Root element: container for all file entries -->
  <file 
    filename="design1.emb"         <!-- Name of the file (with extension); used as a unique identifier -->
    filecontents="..."                       <!-- Base64-encoded file contents -->
  />
  <file 
    filename="design2.emb"       <!-- Another file entry -->
    filecontents="..." 
  />
  <file 
    filename="trueview.png"      <!-- Typically an image preview or render -->
    filecontents="..." 
  />
</files>

Usage

The <files> XML element is used in the following API calls:


Elements

✅ <files>

Root element containing one or more <file> elements. It defines the complete set of files used or produced by the API request.

✅ <file>

Represents a single file in the list...
Attribute
Description
filename
The name of the file, including its extension – e.g. EMB for embroidery designs, PNG for images. This name serves as the unique identifier for referencing the file elsewhere in the request or response.
filecontents
Contains the file data encoded as a Base64 string. This allows binary file content to be safely transferred in XML format.


Encoding notes

When constructing XML, remember certain characters must be escaped to remain valid in XML attribute values:
Character
Escaped as
<
&lt;
&
&amp;
"
&quot; (if using double quotes as delimiters)
'
&apos; (if using single quotes as delimiters)


Remarks

  1. Use multiple <file> elements if you're sending or receiving more than one file. Each <file> can represent an input — such as an uploaded design — or an output — such as a generated TrueView image.
  2. Each filecontents value should be a base64 string — typically generated by reading the file as binary and encoding it.
  3. Ensure that special XML characters in filename are properly escaped — e.g. &&amp;.
  4. Filenames must be unique within the same request/response to avoid ambiguity.

    • Related Articles

    • Embroidery files

      By default, WilcomWorkspace saves to its native EMB file format. This format contains all information necessary both for stitching a design and for later modification. When opening designs created or saved in other formats, WilcomWorkspace converts ...
    • Colors in machine files

      When working with embroidery machine files like Tajima DST, developers often expect the design colors to be preserved. However, unlike Wilcom EMB files, machine files do not contain any color information – only stitch coordinates and STOP codes. This ...
    • Upload design files

      Uploading files to Wilcom Library allows you to store embroidery designs and related materials in a central location where they can be accessed and shared across your organization. When a design file is uploaded, Library creates a design record that ...
    • Download & export files

      Wilcom Library provides several ways to retrieve design files for use outside the library. You can download the original design file, export the design to a machine-ready stitch format, or generate supporting production materials such as worksheets ...
    • How to Reset a Toolbar Layout?

      Symptom: The toolbar layout has been messed up. Solution: You may reset the toolbar layout to make it back to the factory condition. Please follow the procedure below: 1) close ES 2026/ES 2025/ ES DE / ES DE HL/ ES e4.5/ES e4.2 / ES e3 2) in File ...