Area: UI Issues
Sub-Area: File Upload / Institutional Memory / Domain & Data Product Documentation
Issue
When uploading a file (e.g., a PDF) as a documentation link on a Domain or Data Product entity in DataHub Cloud, users may encounter one or both of two cascading errors. First, if the filename contains spaces, the file upload request fails immediately with an "illegal character in path" error because the file identifier is not URL-encoded before being inserted into the request path. Second, even after renaming the file to remove spaces, the upload itself may succeed but attaching the result as an Institutional Memory link fails because the product assets endpoint returns a relative path (e.g., /openapi/v1/files/product_assets/...) rather than an absolute URL. The Institutional Memory link validator requires a fully-qualified URL with a scheme (e.g., https://), so the relative path is rejected with a "URL scheme 'null' is not allowed" error. Both issues stem from the frontend file upload handler not properly encoding filenames and not prepending the instance hostname to the returned asset path.
Error Messages
Failed to add link: Illegal character in path at index N: /openapi/v1/files/product_assets/...__ My File Name.pdfFailed to add link: Failed to change institutional memory for resource urn:li:<entity-type>:<entity-id>. URL scheme 'null' is not allowed.
You Might Be Asking
- Why does uploading a PDF with spaces in its name fail on a Domain or Data Product entity?
- Why does removing spaces from the filename still not allow me to attach the uploaded file as a documentation link?
- What does "URL scheme 'null' is not allowed" mean when adding a file as an Institutional Memory link?
- Is there a workaround for attaching uploaded documents to Domain entities while this bug is present?
Solution
This is a confirmed product defect fixed in DataHub Cloud v2.3.1. Two separate but related bugs were identified and resolved in the same fix:
-
Bug 1 — Spaces in filenames cause an HTTP 400 error:
The file identifier returned after upload was being inserted directly into the request URL path without URL-encoding. Any space character in the original filename caused an "illegal character in path" error.
Resolution in v2.3.1: The frontend now properly URL-encodes the file identifier before constructing the path.
-
Bug 2 — Relative path returned by product assets endpoint fails Institutional Memory validation:
After a successful file upload, the frontend file upload handler returned only the relative path (e.g.,
/openapi/v1/files/product_assets/<file-id>) instead of an absolute URL. When this relative path was passed to the Institutional Memory link validator, it was rejected because no URL scheme (https://) was present.Resolution in v2.3.1: The frontend now prepends
window.location.originto the returned path, producing a fully-qualified URL before the value is submitted to the Institutional Memory endpoint.
Workaround (for versions prior to v2.3.1)
If you are running a version of DataHub Cloud earlier than v2.3.1 and cannot upgrade immediately, use the following workaround to attach documents to Domain or Data Product entities:
- Host your document on an external service such as Google Drive, SharePoint, Confluence, or any publicly or internally accessible file host.
- Copy the fully-qualified external URL to the document (e.g.,
https://drive.google.com/file/d/<your-file-id>/view). - In DataHub, navigate to your Domain or Data Product entity and select Add Link under the Documentation or Institutional Memory section.
- Paste the external URL directly into the link field. The validator accepts any URL that includes a valid scheme (
https://orhttp://).
# Example: Acceptable external link format for Institutional Memory
https://drive.google.com/file/d/<your-file-id>/view
https://your-confluence-instance.example.com/wiki/spaces/<space>/pages/<page-id>
https://sharepoint.example.com/sites/<site>/Shared%20Documents/<document-name>.pdf
Additional Notes
- Both bugs affect the file upload and Institutional Memory link features specifically for Domain and Data Product entities in DataHub Cloud. Other entity types that use the same upload flow may also be affected.
- The fix was released in DataHub Cloud v2.3.1. If you are on an earlier version, the workaround above is the recommended approach until an upgrade is possible.
- These are frontend bugs — no changes to ingestion configuration, metadata policies, or server-side settings are required or will resolve the issue on affected versions.
- The Institutional Memory link validator has always required a fully-qualified URL with a valid scheme. This requirement is by design; the bug was that the upload handler was not producing a URL that satisfied this requirement.
- After upgrading to v2.3.1 or later, filenames with spaces are supported and uploaded files will be correctly referenced with absolute URLs when added as documentation links.
Related Documentation
- DataHub File Upload and Download Feature Guide
- Domain Entity Reference
- Institutional Memory Aspect Reference
- Documentation and Institutional Memory Feature Guide
Tags: file-upload, institutional-memory, domain, data-product, relative-url, url-scheme, spaces-in-filename, documentation-link, datahub-cloud, v2.3.1