Hi, I want to use patchy as a image host service for my website.
Currently, I use a free image host, like freeimage.host, I can upload image use HTTP API as
describe in this link, it's works! but, because freeimage.host have a really bad AI image detection, which mistakes pictures of puppies for adult content, there are several free candidate, e.g. Imgur, ImgBB, but both of them invisible in the China homeland.
So, I have to consider use a individual image service for image host service only.
- paste in the browser
- upload a image into somewhere use this service.
- generate a link for show in a <img ... > tag
I test patchy from the command line, it's works!
image
But, some suggestions:
-
When I upload same one image once again, it generate a new id and url instead, but I prefer not upload exists image and return old url directly instead, cloud services usually do like this to save space.
-
deploy patchy failed if only copy patchy binary to somewhere, because no locales/en.json file exists.
2025年11月06日T04:55:38.479261Z NOTICE - Config: Config file 'config/config.yml' was not found, using the default uploader configuration
2025年11月06日T04:55:38.479262Z NOTICE - Config, Note: You can ignore this error safely if you use environment variables to configure the uploader!
Unhandled exception: Error opening file with mode 'r': 'locales/en.json': No such file or directory (File::NotFoundError)
from /home/zw963/Crystal/share/crystal/src/crystal/system/unix/file.cr:13:7 in 'open'
from /home/zw963/Crystal/share/crystal/src/file.cr:176:20 in 'new_internal'
from /home/zw963/Crystal/share/crystal/src/file.cr:536:12 in 'read'
from /home/zw963/Crystal/git/patchy/src/helpers/i18n.cr:15:21 in 'load_all_locales'
from /home/zw963/Crystal/git/patchy/src/helpers/i18n.cr:9:11 in '__crystal_main'
from /home/zw963/Crystal/share/crystal/src/crystal/main.cr:129:5 in 'main'
from /home/zw963/Crystal/share/crystal/src/crystal/system/unix/main.cr:10:3 in 'main'
from /usr/lib/libc.so.6 in '??'
from /usr/lib/libc.so.6 in '__libc_start_main'
from ./patchy in '_start'
from ???
I consider you can use baked_file_system to add this config file into binary, or more simple but naive solution, compile files in locales into binary when compile-time, then mount it directly when running it use baked_file_system_mounter (because I consider files in locales folder rarely changes)
I will try to update my website use patchy instead, and update suggestion here if I found it useful.
Thanks
Hi, I want to use patchy as a image host service for my website.
Currently, I use a free image host, like [freeimage.host](https://freeimage.host/api), I can upload image use HTTP API as
describe in this link, it's works! but, because freeimage.host have a really bad AI image detection, which mistakes pictures of puppies for adult content, there are several free candidate, e.g. Imgur, ImgBB, but both of them invisible in the China homeland.
So, I have to consider use a individual image service for image host service only.
1. paste in the browser
2. upload a image into somewhere use this service.
3. generate a link for show in a <img ... > tag
I test patchy from the command line, it's works!

But, some suggestions:
1. When I upload same one image once again, it generate a new id and url instead, but I prefer not upload exists image and return old url directly instead, cloud services usually do like this to save space.
2. deploy patchy failed if only copy `patchy` binary to somewhere, because no `locales/en.json` file exists.
```
2025年11月06日T04:55:38.479261Z NOTICE - Config: Config file 'config/config.yml' was not found, using the default uploader configuration
2025年11月06日T04:55:38.479262Z NOTICE - Config, Note: You can ignore this error safely if you use environment variables to configure the uploader!
Unhandled exception: Error opening file with mode 'r': 'locales/en.json': No such file or directory (File::NotFoundError)
from /home/zw963/Crystal/share/crystal/src/crystal/system/unix/file.cr:13:7 in 'open'
from /home/zw963/Crystal/share/crystal/src/file.cr:176:20 in 'new_internal'
from /home/zw963/Crystal/share/crystal/src/file.cr:536:12 in 'read'
from /home/zw963/Crystal/git/patchy/src/helpers/i18n.cr:15:21 in 'load_all_locales'
from /home/zw963/Crystal/git/patchy/src/helpers/i18n.cr:9:11 in '__crystal_main'
from /home/zw963/Crystal/share/crystal/src/crystal/main.cr:129:5 in 'main'
from /home/zw963/Crystal/share/crystal/src/crystal/system/unix/main.cr:10:3 in 'main'
from /usr/lib/libc.so.6 in '??'
from /usr/lib/libc.so.6 in '__libc_start_main'
from ./patchy in '_start'
from ???
```
I consider you can use [baked_file_system](https://github.com/schovi/baked_file_system) to add this config file into binary, or more simple but naive solution, compile files in `locales` into binary when compile-time, then mount it directly when running it use [baked_file_system_mounter](https://github.com/crystal-china/baked_file_system_mounter) (because I consider files in locales folder rarely changes)
I will try to update my website use patchy instead, and update suggestion here if I found it useful.
Thanks