Forum Academy Marketplace Showcase Pricing Features

Saving Image from PictureInput

I’m trying to save an image selected in the PictureInput to a certain field in the database. On the site a user with a specific level of access will get the option to upload the file, but I want the image to then be displayed for all users. Right now I have it working to the point that I can upload the image and it is displayed, but I can’t figure out how to specify which field in the database to save the file to. When I select “Parent Group’s Community’s Picture” in the “Attach to” field it says “Attach to should be anything saveable but right now it is an image”. I looked at the documentation for PictureInput, and it seems like maybe that would be defined in the Storage Service setting, but I can’t find that option…

https://gyazo.com/cbb1fde2635eb6a2881b3ecfb712fb5b

Any help would be appreciated. Thanks!

I just tried something a little different. I checked the “Enable auto binding to parent Elements thing” and set the parent group to the Current User’s Community. I defined a new “Admin” role in the Community table and set the user to have full access to every field in the table when the Current User’s isAdmin field is true.

I logged in with a user that has isAdmin set to try and tried to upload. It threw an error saying I didn’t have permission to modify that field. I then adjusted the “Anonymous” role to give all users access to modify the Community’s Picture field. Tried to upload again and it worked! I’m still very confused, though, as to why the Where clause didn’t pick up the user’s isAdmin field value…

1 Like