< 132019-02-14⋎15 >

farmOS (farmos.org) is a free and open source, web-based farm management system. User guide: farmos.org/guide/ - Feature requests and bug reports: github.com/farmOS/farmOS/issuesSet by ChanServ on 2018-08-16 at 14:32
02:10*JustTB has quit (Ping timeout: 245 seconds)
04:09*JustTB has joined
09:51*JustTB has quit (Quit: Leaving.)
09:51*JustTB has joined
10:15*JustTB has quit (Quit: Leaving.)
10:42*JustTB has joined
12:43*e0mi has quit (Remote host closed the connection)
12:45*e0mi has joined
12:51*e0mi has quit (Quit: NO)
15:45*JustTB has quit (Quit: Leaving.)
16:16*JustTB has joined
16:36*JustTB has quit (Quit: Leaving.)
16:37*JustTB has joined
16:38*JustTB has quit (Client Quit)
16:40*JustTB has joined
16:41*JustTB has quit (Client Quit)
16:42*JustTB has joined
17:36jgaehring[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
17:39mstenta[m]jgaehring: Yes that should be possible.
17:40jgaehring[m]what i've tried so far hasn't worked
17:40jgaehring[m]looking at this log: test.farmos.net/log.json?id=157
17:41jgaehring[m]i've tried accessing the this file endpoint: test.farmos.net/file/11.json
17:41jgaehring[m]but it comes back 403
17:41mstenta[m]Ahh gotcha
17:41mstenta[m]Oh interesting...
17:41mstenta[m]I didn't realize the restws module links to files by their fid
17:42mstenta[m]Rather than their filepath
17:42mstenta[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...
17:42mstenta[m]Let me take a look...
17:43mstenta[m]Oh... ah-ha!
17:43mstenta[m]It is possible - I just need to grant access to the file endpoint for farm roles.
17:44mstenta[m](oh whoa... just updated my riot.im and it looks like they redesigned - looks great!)
17:44mstenta[m](and i'm in dark mode)
17:47jgaehring[m]cool, yea, i just was able to access it on my local Docker server, which is logged in with admin privileges
17:47mstenta[m]great
17:47mstenta[m]yea, so it's just a matter of adding a single line to a file in farmOS
17:48mstenta[m]github.com/farmOS/farmOS/blob/7.x-1.x/mo
17:48jgaehring[m]ah ok
17:48mstenta[m]`$perms[] = 'access resource file';`
17:48mstenta[m]I think that would do it (plus a cache clear)
17:49jgaehring[m]cool!
17:51jgaehring[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
17:51mstenta[m]Great!
17:52mstenta[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.
17:53jgaehring[m]cool
20:56*JustTB has quit (Quit: Leaving.)
20:56*JustTB has joined

< 132019-02-14⋏15 >