Muut
October 21, 2016, 2:57pm
1
Hi all. I have problem with file uploading on website form.
I have this code in frontpage.md
forms:
contact-form:
fields:
- custom_file: fileds
type: file
label: 'Upload file'
destination: 'user/downloads'
multiple: true
avoid_overwriting: false
limit: 10
filesize: 5
Site shows file input ,but without any labels and actions. Anybody knows why it is not working? Please help
Muut
October 25, 2016, 1:56pm
3
@rhukster exactly this code ?And all is fine?
Muut
October 25, 2016, 4:46pm
4
Make sure indenting is all ok. Try adding a new line after the -
(keep it on a line alone)
Muut
October 28, 2016, 10:43am
5
@flaviocopes thanks ,all is working. But, i have another problem, when i tried to delete just uploaded file. Grav can not remove file. It requires some ‘gran-n.json’ file ,where ‘grav-n’ is project name.I did not find the answer in the documentation and can not understand what could be the problem. Screen Shot 2016-10-28 at 13
Muut
October 28, 2016, 11:42am
6
Is this form in the home page?
Muut
December 13, 2016, 12:39am
8
@arrtych1 how did you fix your file upload issue? I have the same issue and can’t make it work. I’m using the deliver theme.
my code:
-
name: message
label: Message
classes: 'form-control form-control-lg'
size: long
placeholder: 'Votre message'
type: textarea
validate:
required: true
-
custom_file: thefiles
type: file
label: 'vos photos'
multiple: true
destination: user/upload
accept:
- 'image/*'