# FileSource as ux:Key problem.

**URL:** <https://forums.fusetools.com/t/filesource-as-ux-key-problem/6553>\
**Category:** Bug Reports\
**Created:** [February 25, 2017, 10:42am UTC](https://forums.fusetools.com/t/filesource-as-ux-key-problem/6553 "2017-02-25T10:42:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sergio\_Clebal](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/sergio_clebal/32/71_2.png) [@Sergio\_Clebal](https://forums.fusetools.com/u/Sergio_Clebal)\
**Post date:** [February 25, 2017, 10:42am UTC](https://forums.fusetools.com/t/filesource-as-ux-key-problem/6553/1 "2017-02-25T10:42:04Z")

</div>

I’m using Fuse 34.0 in macOS Sierra. I’m trying to do an expression to get images dynamically:

`<ImageFill File="Assets/portada/{title}1.jpg" StretchMode="UniformToFill" />`

The thing is that File property needs FileSource and the UX expression return a string. To solve it, I tried to get the FileSource using a ux:Key:

`<FileSource ux:Key="Portada1" ux:Value="Assets/portada/{title}1.jpg" />`

But when I build it, I get this error: **Error E0000: Uno.UX.FileSource has no default constructor**.

How could I do it?

Thank you.

---

<div class="post-metadata">

**Author:** ![Anders\_Lassen](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/anders_lassen/32/522_2.png) [@Anders\_Lassen](https://forums.fusetools.com/u/Anders_Lassen)\
**Post date:** [February 26, 2017, 2:24pm UTC](https://forums.fusetools.com/t/filesource-as-ux-key-problem/6553/2 "2017-02-26T14:24:32Z")

</div>

Hi!

This is fixed internally but not rolled out yet. I believe the current pre-release (Fuse 0.35) contains this fix: [https://www.fusetools.com/downloads/channel/qa](https://www.fusetools.com/downloads/channel/qa)

If not, then a near future release will enable expressions in file paths.

Until then, you will have to do a `.map()` in javascript to expand to the full file path.

---

<div class="post-metadata">

**Author:** ![Anders\_Lassen](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/anders_lassen/32/522_2.png) [@Anders\_Lassen](https://forums.fusetools.com/u/Anders_Lassen)\
**Post date:** [February 27, 2017, 1:32pm UTC](https://forums.fusetools.com/t/filesource-as-ux-key-problem/6553/3 "2017-02-27T13:32:30Z")

</div>

Unfortunately it didn’t make it into 0.35, but next release should be good 🙂

---

<div class="post-metadata">

**Author:** ![Sergio\_Clebal](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/sergio_clebal/32/71_2.png) [@Sergio\_Clebal](https://forums.fusetools.com/u/Sergio_Clebal)\
**Post date:** [February 27, 2017, 1:35pm UTC](https://forums.fusetools.com/t/filesource-as-ux-key-problem/6553/4 "2017-02-27T13:35:03Z")

</div>

I wait it 🙂 Thanks for the support.
