azmg
March 8, 2019, 12:22pm
1
Hello. I’m stuck in creating upload field in panel, sorry for some noob question there.
I’ve “created” field in my yml like this:
steam_image:
label: Select files...
type: files
multiple: false
But there is “Select” button instead of “Upload”, and I cannot understand, what should I do to create upload fields to my pages.
Thank you for any advance!
For uploading, you have to create afiles section instead of a Panel field. Upload functionality for the files field is planned for 3.1
azmg
March 8, 2019, 12:30pm
3
Yeah, I’m understand now, thank you very much
I need to create something like this:
image_uploads:
type: files
fields:
images:
type: files
No, a files section doesn’t have fields.
Basic example:
sections:
gallery:
type: files
headline: Gallery images
Check the documentation for details.
azmg
March 8, 2019, 12:44pm
6
Now I’m understand, thank you.
I need to create one upload section and as many file fields as I need.
Then I need to upload files to upload section and then select them in my fields from uploaded files list.
Roman
May 9, 2019, 12:17pm
7
I still don’t understand, how it works, for example I have this blueprint:
sections:
files:
extends: sections/files
then in files.yml it’s:
headline: Files
type: files
template: image
and it’s works as file UPLOAD:
but when I do similar:
label: Citatos
type: builder
fieldsets:
imglist:
label: Images List
fields:
imglistimg:
label: Sąrašo nuotrauka
type: files
template: listimg
max: 1
imglisttextarea:
label: Aprašymas
type: textarea
imglisttitle:
label: Antraštė
type: text
then in last example it works as file SELECT. So why it’s analogical code in blueprints, but works different?
Roman
May 9, 2019, 12:30pm
8
If it’s only possible as section, @texnixe , can you help how to change select to upload in this blueprint? Don’t understand where to put section here:
label: Builder
type: builder
fieldsets:
imglist:
label: Images List
fields:
imglistimg:
label: Sąrašo nuotrauka
type: files
template: listimg
max: 1
imglisttextarea:
label: Aprašymas
type: textarea
imglisttitle:
label: Antraštė
type: text
There are files sections (for uploading) and files fields (for selecting). In the latter case, you have defined a field. In a field, you can currently only select files. Uploading for files fields will come in 3.2
You can’t have a section in a fieldset.
1 Like
Roman
May 9, 2019, 12:35pm
10
I see, will it be possible in version 3.2?
In 3.2 the files field will get an upload option, similar to what we now have in the textarea field. It will not be possible to add a files section in a builder fieldset.