ifox
10/23/2021, 11:23 AMphp artisan storage:link if so?`Sebastlan
10/23/2021, 11:27 AM`Sebastlan
10/23/2021, 11:29 AMifox
10/23/2021, 11:32 AM$service the model where you saved that file in the CMS? Is the file form field correctly showing the attached file?`Sebastlan
10/23/2021, 11:33 AM`Sebastlan
10/23/2021, 11:33 AM`Sebastlan
10/23/2021, 11:35 AMpublic $filesParams = [
'service_pdf' => [
'default' => [
[
'max' => 1,
]
],
],
];ifox
10/23/2021, 11:35 AM`Sebastlan
10/23/2021, 11:35 AMifox
10/23/2021, 11:35 AMifox
10/23/2021, 11:36 AM`Sebastlan
10/23/2021, 11:37 AMifox
10/23/2021, 11:37 AMpublic $filesParams = [
'service_pdf'
];ifox
10/23/2021, 11:37 AM`Sebastlan
10/23/2021, 11:39 AM`Sebastlan
10/23/2021, 11:40 AM<?php
namespace App\Models;
use A17\Twill\Models\Behaviors\HasBlocks;
use A17\Twill\Models\Behaviors\HasTranslation;
use A17\Twill\Models\Behaviors\HasSlug;
use A17\Twill\Models\Behaviors\HasMedias;
use A17\Twill\Models\Behaviors\HasFiles;
use A17\Twill\Models\Model;
use CwsDigital\TwillMetadata\Models\Behaviours\HasMetadata;
class Service extends Model
{
use HasBlocks, HasTranslation, HasSlug, HasMedias, HasFiles, HasMetadata;ifox
10/23/2021, 11:41 AM@formField('files'). What are you trying to render the image on in the frontend? A Service? So you are attaching that file to an instance of a Service, no?ifox
10/23/2021, 11:42 AMform.blade.php file look like?`Sebastlan
10/23/2021, 11:43 AM@formField('files', [
'name' => 'service_pdf',
'label' => 'label name',
'translated' => true,
'note' => 'text'
])ifox
10/23/2021, 11:47 AMfileables for that file and service?`Sebastlan
10/23/2021, 11:49 AM`Sebastlan
10/23/2021, 11:49 AMifox
10/23/2021, 11:50 AMifox
10/23/2021, 11:51 AM`Sebastlan
10/23/2021, 11:51 AM`Sebastlan
10/23/2021, 11:56 AM'file_library' => [
'disk' => 'twill_file_library',
'endpoint_type' => env('FILE_LIBRARY_ENDPOINT_TYPE', 's3'),
'cascade_delete' => env('FILE_LIBRARY_CASCADE_DELETE', false),
'local_path' => env('FILE_LIBRARY_LOCAL_PATH', 'uploads'),
'file_service' => env('FILE_LIBRARY_FILE_SERVICE', 'A17\Twill\Services\FileLibrary\Disk'),
'acl' => env('FILE_LIBRARY_ACL', 'public-read'),
'filesize_limit' => env('FILE_LIBRARY_FILESIZE_LIMIT', 50),
'allowed_extensions' => ['pdf', 'odt'],
'prefix_uuid_with_local_path' => false,
],
.env
FILE_LIBRARY_ENDPOINT_TYPE=local
FILE_LIBRARY_LOCAL_PATH=uploads/
FILE_LIBRARY_CASCADE_DELETE=trueifox
10/23/2021, 11:59 AMifox
10/23/2021, 12:00 PM`Sebastlan
10/23/2021, 12:00 PMifox
10/23/2021, 12:01 PM