-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for files #47
Comments
Nope! Just forgot to add it to the intro. I'll do that... |
I think I'm going to restrict the scope of this issue to only files, since Field Kit does not use data streams in any way so far, but I am planning to overhaul images (farmOS/field-kit#45) prior to the FK beta release.
I still really like this idea, and I feel I've gone a long ways to making this possible in the future with how I've encapsulated most of the details about specific entities in |
I'm doing some preliminary investigation into how JSON:API file uploads will work in 2.x, and it looks promising, but will take some experimentation to figure out how best to fit this into farmOS.js itself. It may be instructive to hold off on this until I've resolved farmOS/field-kit#45, using the plain So I am moving this to the general release milestone, but will probably circle back to it first thing, once I resume on Field Kit. |
@paul121 just pointed out a related issue, farmOS/farmOS.py#49, which should prove helpful, particularly this example of "Flow 1" as mentioned in the JSON:API change record: # Flow 1: update existing log
data = open('data.csv', 'rb').read()
response = client.file.create('log', 'observation', 'file', data, 'observation_data.csv', '{log_id}') |
I'm just noticing that the docs for the farmOS Data Model now include both data streams and files. At least, the navigation menu for Record Types now includes them, though they don't appear in the Introduction. Is that intentional, @mstenta?
This also seems like a good time for deciding if I want to parameterize all record types in the model, so if a consumer knows they'll never use data streams or files (eg, perhaps for certain SurveyStack applications), they can be omitted when instantiating the model. Of course, we could include some defaults if the entities are not provided, so essentially the parameter would be an override.
The text was updated successfully, but these errors were encountered: