IRC logs for #farmOS, 2022-04-10 (GMT)

2022-04-09
2022-04-11
TimeNickMessage
[20:00:06]<symbioquine[m]>It's not ideal security-wise, but should be okay for testing purposes.
[20:00:32]<Noaht[m]>symbioquine[m]: DIdn't fix it unfortunately
[20:01:40]<symbioquine[m]>Huh, interesting
[20:36:24]<Noaht[m]>I was able to get it to work by adding ```verify=False``` to ```self.fetch_token(...)``` call in the authorize function in session.py module.
[20:37:04]<Noaht[m]>This is definitely a poor workaround since I forced the edit the farmOS module itself, but that was the only workaround I found that worked.
[22:47:56]<symbioquine[m]><Noaht[m]> "This is definitely a poor..." <- Did you try setting `REQUESTS_CA_BUNDLE` or `CURL_CA_BUNDLE` to the path of your self-signing CA cert? (See https://docs.python-requests.org/en/master/user/advanced/#ssl-cert-verif...)
[23:57:02]<Noaht[m]><symbioquine[m]> "Did you try setting `REQUESTS_CA..." <- That fixed it! Thanks!
[23:58:24]<Noaht[m]>Sorry to bombard with questions haha, but I'm getting this error when I try to upload images or files to a log.
[23:58:24]<Noaht[m]>```The file could not be uploaded because the destination "private://farm/log/2022-04" is invalid.```
[23:59:58]<symbioquine[m]>https://farmos.org/hosting/install/#file-uploads
[00:00:12]<Noaht[m]>Do you have any examples or tools to attach and upload images through the new api? I found this, but it's for the 1.x api (https://gist.github.com/paul121/408dacd4f87a6967257d2bc303148d6e)
[00:01:11]<symbioquine[m]>https://www.drupal.org/docs/core-modules-and-themes/core-modules/jsonapi...
[00:02:13]<symbioquine[m]>You need the configuration from the first link for the documentation of the second link to be relevant.
[00:02:22]<Noaht[m]>symbioquine[m]: Yes, I saw this as well, but I meant through farmos.py
[00:12:42]<symbioquine[m]><Noaht[m]> "Yes, I saw this as well, but I..." <- Hmmm, idk about through farmos.py...
[00:13:05]<symbioquine[m]>Probably need paul121 to weigh in.
[00:17:13]<Noaht[m]><symbioquine[m]> "https://farmos.org/hosting/..." <- Also, this didn't actually work. Just tried and it still throws the error with images. It doesnt throw the error with files anymore, but after I save the log the files aren't actually uploaded and attached.
[00:19:16]<Noaht[m]>When I go to administrator settings, this error is at the top.
[00:19:17]<Noaht[m]>ACTION uploaded an image: (61KiB) < https://libera.ems.host/_matrix/media/r0/download/matrix.org/XfHlETnhifn... >
[00:23:03]<symbioquine[m]>You need to make sure the directory exists and is writable by the web user that farmOS runs as.
[00:41:01]<Noaht[m]>I created the directory and made it writeable. Error disappeared and when I upload files it's not throwing an error, but the files don't get attached to the logs. After saving and viewing the log the files aren't there. Images are still throwing the same error
[00:41:03]<Noaht[m]>ACTION uploaded an image: (39KiB) < https://libera.ems.host/_matrix/media/r0/download/matrix.org/woslkzjexOT... >
[00:44:27]<Noaht[m]>What's weird is if I try to upload a file first, the image upload doesn't throw an error. Image upload only throws an error if I try to upload an image before a file
[01:09:17]<Noaht[m]>I set all of these in the settings.php and made sure the directories exist... (full message at https://libera.ems.host/_matrix/media/r0/download/libera.chat/0399574a7f...)
[01:53:44]<paul121[m]><Noaht[m]> "Yes, I saw this as well, but I..." <- An example of uploading files with farmOS.py is here. Curious if you have feedback for that proposed API! https://github.com/farmOS/farmOS.py/issues/49
[16:53:12]<Noaht[m]><paul121[m]> "An example of uploading files..." <- I think implementing that would definitely be helpful. I'm having an issue getting that example to work, however. I copied that first example line... (full message at https://libera.ems.host/_matrix/media/r0/download/libera.chat/a6e2b02df2...)