Skip to content

The datasheet URL field doesn't accept file links (file protocol) #1415

@mMuck

Description

@mMuck

Describe the bug
Some people have a well organized local pdf library of datasheets and want to just link them as URLs instead of upload(copy) them. The file protocol (file:///) is the normal way of routing a browser to local resources. The use of this type of links is possible. Most of the browsers will require a security policy for this but the URL field should not limit to only http/https. Please let the browser decide what links to follow and do not restrict the URL field to some common web protocols.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the attachment page of a part
  2. Add a new attachment
  3. Enter a file link at the URL field which works in a separate tab of the browser
    file:///X:/Datasheets/123.pdf
  4. See error when saving the entry (file:/// is not accepted)
  5. BUT: After saving and the error is displayed a link is displayed at the right 'View external version'. This link already works as it should (when browser allows; i.e. with policy set correct). But no way to save this.

Expected behavior
http/https/file, perhaps ftp etc. should be allows link protocols.
This could be a option how this validation works but for my understanding optional.

Server Side

  • Part-DB Version: nearly current 2.12.1

Desktop (please complete the following information):

  • OS: Win11
  • Browser: Firefox
  • Version: 151

Additional context
Browser policy setting: I.e. Firefox - here this settings (about:config) allow links to local files/folders for specified website/webtool:

capability.policy.partdb-locallinks.checkloaduri.enabled = allAccess
capability.policy.partdb-locallinks.sites = https://partdb.server.tld
capability.policy.policynames = partdb-locallinks

Even links to folders are possible like the local or network drive would be a ftp output within the browser.

And: Thanks for the great Part-DB tool!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions