Closed zbruhnke closed 2 years ago
This feels like a hack where a proper solution should be added.
yeah I mean I cannot deny that lol - I just figured this both preserved backwards compatibility and gave us a desired solution, but I cannot say that this would be the "recommended" path for a long term sustainable solution.
However for maintainability and backwards compatibility it felt like a fair compromise
The other open question would be whether you need the directory at all. If you did away with the directory it would mirror the way outgoing files are saved in s3 compatible storage which might be nice
Yea, but in cases where the FI only uses the root directory it can get messy. Having subfolders allows us to determine which processor handled the file.
I couldn't push on your branch so I created https://github.com/moov-io/achgateway/pull/124 with this change.
ah nice, I'll close this in favor of https://github.com/moov-io/achgateway/pull/124
Changes
A quick way to make folder structure in s3 compatible storage configurable
Why Are Changes Being Made
So you can customize what your folders are named so this adds two env variables
ODFI_FOLDER
And
RDFI_FOLDER
If you leave them blank or do not set them it will default to the original paths so this is backwards compatible
I did make a tweak to the path so that it is ALWAYS
{NAME}/{SFTP}/{DATE}/{DIRECTORY}/{FILE}
instead of
{NAME}/{SFTP}/{DIRECTORY}/{DATE}/{FILE}
because it was a bit frustrating to have to navigate another folder level deep to see which files were for which days, figured this would be easier for most people if done this way as I could not see a reasonably good reason to have the directory names be ahead of the dates, but if that's incorrect happy to chat about it
The other open question would be whether you need the directory at all. If you did away with the directory it would mirror the way outgoing files are saved in s3 compatible storage which might be nice, but i'm not sure why it was originally chosen so I do not want to make assumptions without learnings