devtutorum
devtutorum
TCTwill CMS
Created by devtutorum on 9/25/2023 in #👊support
S3 Storage and file path for signed key
I am setting up Twill stored files with signed keys from AWS. Normally I would be calling the filename like so:
$file_model->file('file_name')
$file_model->file('file_name')
And this gets the whole src URL for amazon domain + directory + filename. I am doing this to overcome the full S3 path being returned from model and generate signed url aswell:
$twill_file_id = \DB::table('twill_fileables')->where('fileable_id', $lesson_id)->value('file_id');
$twill_file_uuid = \DB::table('twill_files')->where('id', $twill_file_id)->value('uuid');

$temporarySignedUrl = \Storage::disk('s3')->temporaryUrl($twill_file_uuid, now()->addMinutes(10));
$twill_file_id = \DB::table('twill_fileables')->where('fileable_id', $lesson_id)->value('file_id');
$twill_file_uuid = \DB::table('twill_files')->where('id', $twill_file_id)->value('uuid');

$temporarySignedUrl = \Storage::disk('s3')->temporaryUrl($twill_file_uuid, now()->addMinutes(10));
Is there a better option that generates the temporary signed url in Twill out of the box? Or atleast a cleaner way to call the URL by only the directory structure not the whole URL with amazon.com base without having to query the two tables?
2 replies
TCTwill CMS
Created by devtutorum on 2/14/2023 in #👊support
Custom function in a Module Controller
I need to trigger a custom function that is run after a user clicks "Update" for a post in a Twill module, and that function needs to receive a variable e.g. the post_id number. I know there are Admin Controllers for each module so I'm guessing I'd put it there but how would it launch. Where do I start?
2 replies
TCTwill CMS
Created by devtutorum on 12/14/2022 in #👊support
Browser route for sub-menu (primary navigation)
6 replies
TCTwill CMS
Created by devtutorum on 11/29/2022 in #👊support
Browser fields the id of the object doesn't save
Browser options show list with logo and name, gets attached correctly including logo and name. When you hit refresh the logo stays but the name disappears. Record exists in related table. The id of the object doesn't save into the modules table, stays null. At what point in the Twill system does/should the browser field identifier be saved into the database?
24 replies
TCTwill CMS
Created by devtutorum on 11/28/2022 in #👊support
InvalidArgumentExceptionUrlBuilder must be passed a string domain
Getting this error after switching to Imgix from Glide in MEDIA_LIBRARY_IMAGE_SERVICE.
27 replies