# \[ANN\] EmbeddedStaticFiles.jl - Store your static assets, both locally and relocatably

**URL:** https://discourse.julialang.org/t/ann-embeddedstaticfiles-jl-store-your-static-assets-both-locally-and-relocatably/119969
**Category:** Package Announcements
**Tags:** package, announcement
**Created:** [September 27, 2024, 3:20pm UTC](https://discourse.julialang.org/t/ann-embeddedstaticfiles-jl-store-your-static-assets-both-locally-and-relocatably/119969 "2024-09-27T15:20:00Z")
**Posts on this page:** 1
**Showing post:** 10

<div class="post-metadata">

### Author: ![nhz2](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nhz2/32/44428_2.png) [@nhz2](https://discourse.julialang.org/u/nhz2)
#### Post date: [September 28, 2024, 12:03am UTC](https://discourse.julialang.org/t/ann-embeddedstaticfiles-jl-store-your-static-assets-both-locally-and-relocatably/119969/10 "2024-09-28T00:03:45Z")

</div>

Yes, this is not relocatable because the read happens inside a function. Try with the read happening at the top level into a global constant:

```julia
# Test package with sample.jpg
module MyPackage

export send_sample_file

include_dependency(joinpath(@ __DIR__ , "../sample.jpg"))
const SAMPLE_DATA = read(joinpath(@ __DIR__ , "../sample.jpg"))

function send_sample_file()
    SAMPLE_DATA
end

end

```

---

_[View the full topic](https://discourse.julialang.org/t/ann-embeddedstaticfiles-jl-store-your-static-assets-both-locally-and-relocatably/119969)._
