| [21:10:03] | * JustTB has quit (Ping timeout: 245 seconds) |
| [23:09:04] | * JustTB has joined #farmos |
| [04:51:01] | * JustTB has quit (Quit: Leaving.) |
| [04:51:29] | * JustTB has joined #farmos |
| [05:15:52] | * JustTB has quit (Quit: Leaving.) |
| [05:42:17] | * JustTB has joined #farmos |
| [07:43:53] | * e0mi has quit (Remote host closed the connection) |
| [07:45:18] | * e0mi has joined #farmos |
| [07:51:59] | * e0mi has quit (Quit: NO) |
| [10:45:51] | * JustTB has quit (Quit: Leaving.) |
| [11:16:20] | * JustTB has joined #farmos |
| [11:36:42] | * JustTB has quit (Quit: Leaving.) |
| [11:37:05] | * JustTB has joined #farmos |
| [11:38:49] | * JustTB has quit (Client Quit) |
| [11:40:16] | * JustTB has joined #farmos |
| [11:41:18] | * JustTB has quit (Client Quit) |
| [11:42:20] | * JustTB has joined #farmos |
| [12:36:19] | <jgaehring[m]> | mstenta: I'm wondering whether it is possible to access a url for an image file attached to a log. alexasbeet and I have started talking about long term solutions for storing/displaying images associated with logs, and it would be nice when the network is available to just simply load images with an <img src=""/> tag, and save that url as a reference in logs |
| [12:39:31] | <mstenta[m]> | jgaehring: Yes that should be possible. |
| [12:40:27] | <jgaehring[m]> | what i've tried so far hasn't worked |
| [12:40:38] | <jgaehring[m]> | looking at this log: https://test.farmos.net/log.json?id=157 |
| [12:41:18] | <jgaehring[m]> | i've tried accessing the this file endpoint: https://test.farmos.net/file/11.json |
| [12:41:23] | <jgaehring[m]> | but it comes back 403 |
| [12:41:39] | <mstenta[m]> | Ahh gotcha |
| [12:41:47] | <mstenta[m]> | Oh interesting... |
| [12:41:58] | <mstenta[m]> | I didn't realize the restws module links to files by their fid |
| [12:42:02] | <mstenta[m]> | Rather than their filepath |
| [12:42:44] | <mstenta[m]> | Hmm... I'm not sure that a `file/[id].json` endpoint exists... because files are not technically Drupal entities, and those endpoints are created for entities... |
| [12:42:47] | <mstenta[m]> | Let me take a look... |
| [12:43:19] | <mstenta[m]> | Oh... ah-ha! |
| [12:43:31] | <mstenta[m]> | It is possible - I just need to grant access to the file endpoint for farm roles. |
| [12:44:28] | <mstenta[m]> | (oh whoa... just updated my riot.im and it looks like they redesigned - looks great!) |
| [12:44:34] | <mstenta[m]> | (and i'm in dark mode) |
| [12:47:08] | <jgaehring[m]> | cool, yea, i just was able to access it on my local Docker server, which is logged in with admin privileges |
| [12:47:24] | <mstenta[m]> | great |
| [12:47:40] | <mstenta[m]> | yea, so it's just a matter of adding a single line to a file in farmOS |
| [12:48:15] | <mstenta[m]> | https://github.com/farmOS/farmOS/blob/7.x-1.x/modules/farm/farm_api/farm... |
| [12:48:19] | <jgaehring[m]> | ah ok |
| [12:48:42] | <mstenta[m]> | `$perms[] = 'access resource file';` |
| [12:48:42] | <mstenta[m]> | I think that would do it (plus a cache clear) |
| [12:49:17] | <jgaehring[m]> | cool! |
| [12:51:22] | <jgaehring[m]> | we're still a long ways from implementing anything that will require it, but as long as I know it's possible, it gives me a clear path forward as far as how to strucure the internal reference object |
| [12:51:56] | <mstenta[m]> | Great! |
| [12:52:36] | <mstenta[m]> | I'll try to remember to add that soon - but if I forget, feel free to just add that line and make a PR! Super easy. |
| [12:53:27] | <jgaehring[m]> | cool |
| [15:56:10] | * JustTB has quit (Quit: Leaving.) |
| [15:56:41] | * JustTB has joined #farmos |