picfit
picfit copied to clipboard
Confusing "src" and "dst" configuration
I had a confusing moment regarding this config:
{
"port": 3001,
"storage": {
"src": {
"type": "http+fs", "base_url": "http://static.stxt.media.int", "location": "/data/picfit/"
},
"dst": {
"type": "fs", "location": "/data/picfit/"
}
},
"kvstore": {
"type": "cache"
}
}
In fact dst.location
is redundant with src.location
since the location
part of src
basically describes the dst
path in case of type:http+fs
. Still dst
is required in order not to get panics with kvstore.type:cache
for cached images.
However, source should be defined in src
, destination in dst
:
{
"port": 3001,
"storage": {
"src": {
"type": "http", "base_url": "http://static.stxt.media.int"
},
"dst": {
"type": "fs", "location": "/data/picfit/"
}
},
"kvstore": {
"type": "cache"
}
}
BTW: This would obviously break old configs. If you consider this 'proposal' despite of that fact, I could try to provide a PR... let me know.
this confusion may explain my issue #90