keichan34/exfile

Support file metadata

keichan34 opened this issue · 0 comments

The main goal is that I want to be able to store additional data in the database, not just the file ID. Examples include things like original image dimensions, file size, content type, etc.

However, it isn't Exfile's responsibility to persist the data to the database, just give it a place in the Exfile.File struct. Although Exfile comes with a Ecto type for convenience, it's ultimately the application's responsibility to store data.

I considered a few strategies for Exfile to help with the persistence, but I'm just going to make a facility for processors to write and/or read metadata into the Exfile.File struct.

This change means that processors won't be operating on tempfiles or io-pids anymore; they'll be working with full-fledged Exfile.File structs.