Contributions 1 min read

# Added file URI scheme in Mail helper for resolving absolute paths

Check out how one of our Pimcore developers helped resolve absolute paths in Mail helper by adding file URI scheme. Today, it's an official part of Pimcore.

Last updated on 24 September, 2021

## Key takeaways

1. Pimcore's Mail helper replaced file URI schemes with HTTP or HTTPS while formatting asset links, for example when generating PDFs from HTML pages.
2. The fix adds a condition that skips formatting for file URI schemes, since the developer provides the full file path when adding assets.
3. Developers can now use file URI schemes when rendering PDFs, and the change is an official part of Pimcore.

## **What was the issue?**

The issue was when e.g. generating PDF with assets that have file URI schemes, they were replaced by HTTPS/HTTP URI schemes during formatting of asset links.

## **How did you solve it?**

I’ve solved it by adding an additional condition to skip formatting of file URI scheme leaving it as is because the full path to file will be provided by the developer while adding assets on page with file URI scheme.

## **Why is this fix important?**

It’s important because usage of file URI scheme wasn’t possible before when e.g. rendering PDF from HTML pages. This allows developers more options while planning functionalities similar to the one I described in the issue.

## **How does it feel to contribute to a platform such as Pimcore?**

It feels good to contribute to Pimcore knowing that your change might help someone and in the end help Pimcore become a better and more reliable platform.

And if you want to check out this [pull request](https://github.com/pimcore/pimcore/pull/8286), just follow the link!

## Related

[Contributions **Fixing export functionality when exporting zero** Read more about the latest pull request we've made regarding the development of Pimcore platform! Our Pimconaut, Tomislav, made sure that users can now export to XLIFF any… 1 min read](https://factory.dev/pimcore-knowledge-base/contributions/fixing-export-functionality) [Contributions **Table data type not using the table config fix** We've discovered a new bug - and now it's fixed! Check out how Dino, our Pimcore developer, fixed this issue and made sure that Table data types work… 1 min read](https://factory.dev/pimcore-knowledge-base/contributions/table-data-type-fix) [Contributions **Fixing the invisible field inside block element** Another Pimcore fix is coming straight from Factory! Our Pimcore developer, Dino, recently fixed the issue related to invisible fields inside block elements. Visit us and read more… 1 min read](https://factory.dev/pimcore-knowledge-base/contributions/fixing-the-invisible-field)

---

Source: https://factory.dev/pimcore-knowledge-base/contributions/added-file-uri-scheme-mail-helper
