Page 1 of 1
File upload
Posted: Mon Jan 25, 2021 11:33 pm
by windsurfer
I have a contact us form and put the file upload on with the wizard. I have both set to email to an email address, it will send the email but not the attachments. Am i missing something perhaps ?
Re: File upload
Posted: Tue Jan 26, 2021 6:52 am
by Pablo
Open the advanced properties of the form and enable 'use PHPMailer'
Re: File upload
Posted: Tue Jan 26, 2021 2:04 pm
by windsurfer
I set it to Use PHPMailer on both the form and file upload section and still no file upload.
I even tried a page with just the file upload from the file wizard and no file gets attached. I tried the smtp settings as well and nothing.
Re: File upload
Posted: Tue Jan 26, 2021 3:08 pm
by Pablo
Did you create the upolaod folder on the server with write permissions?
Are there any errors in the PHP log on the server?
Re: File upload
Posted: Tue Jan 26, 2021 5:01 pm
by windsurfer
The attachment is supposed to come with the email but when i select to upload it to the upload directory 777 it doesn't upload it there either.
My host is looking into why this is happening.
Re: File upload
Posted: Tue Jan 26, 2021 5:44 pm
by windsurfer
I can set the mail options on the contact us form and on the file upload extension and i am assuming i should use the same settings in both, or not ?
Re: File upload
Posted: Tue Jan 26, 2021 6:06 pm
by Pablo
What do you mean by the 'file upload extension?
Are you referring to this?
http://wysiwygwebbuilder.com/fileuploader.html
This extension should not be part of a form.
Re: File upload
Posted: Tue Jan 26, 2021 6:29 pm
by windsurfer
No
Formwizard-Form Processor:File Upload.
I got it working but when i try it it puts a link in the email. Is it possible to attach the file to the email itself instead of a link to the upload folder.
When i uncheck the upload folder i don't get a link or attachment.
Re: File upload
Posted: Tue Jan 26, 2021 6:40 pm
by Pablo
- enable PHP Mailer
- uncheck 'Upload file to to a folder on the server'
Files should now be attached. If not, then this may have been blocked by your web host.
For example, because the files are too big or the file type is not allowed.
Note: it is very difficult to help you if I cannot see what you have done.
The software has thousands of options and millions of possible combinations.
Please always include a demo project so I can see all your settings. That will save us both a lot of time.
Re: File upload
Posted: Tue Jan 26, 2021 6:53 pm
by windsurfer
php mailer is enabled , when i check the upload folder it puts the link in the email but when i uncheck that it won't attach it to the email so i contacted my host. 1 thing i did notice is that when i attach a file with the wrong extension or 1 that is too big it won't give an error message but goes to the success page and sends the email anyway.
Below is a link to a simple form.
https://www.cvitp.ca/file.php
Re: File upload
Posted: Tue Jan 26, 2021 9:11 pm
by Pablo
For attachements to work, you must uncheck 'Upload file to to a folder on the server'
If you need further assistance, then please share a demo project
Re: File upload
Posted: Tue Jan 26, 2021 10:03 pm
by windsurfer
I did uncheck that.
Also i did send you link to a page thas has the form on it.
You could aslo go to cvitp.ca and select contact us or i can send you the file itself
Re: File upload
Posted: Wed Jan 27, 2021 6:54 am
by Pablo
I cannot see what you have done based on the published page,.
To be able to help you, I need the project file (wbs)
Related FAQ:
http://www.wysiwygwebbuilder.com/forum/ ... 10&t=82134
Re: File upload
Posted: Wed Jan 27, 2021 1:59 pm
by windsurfer
Hello
I created a simple page with the file upload created in the Form Wizard.
I have tried with the "Upload files to a folder on the server" and without.
After i created the upload folder on the server called upload it would upload the file to that folder and put a link to that folder in the email.
When i uncheck that it will send me the email but won't attach the file to the email.
Right now the form is set to upload to a folder.
I also noticed that even though the max file size is 1MB and the type is jpg','jpeg','gif','pdf I attached an MP4 (14MB) and MP3 (3MB) file both files are well over 1MB and they both got uploaded to the upload folder.
Not sure what else to tell you.
The website is
www.wilstv.com
The wbs file is at
www.wilstv.com/wbs/Untitled1.wbs
Re: File upload
Posted: Wed Jan 27, 2021 2:33 pm
by Pablo
Why did you add a custom script to the page?
This will disable the built-in script!
Please remove the script.
Also:
- the 'Upload file to to a folder on the server' must be OFF (unchecked)
- the form should have a success and error page.
Re: File upload
Posted: Wed Jan 27, 2021 2:52 pm
by windsurfer
I know that the file upload needs to be unchecked.
The form does have a success and error page on the working site.
I did not put the custom script there, that was put there by the form wizard.
Re: File upload
Posted: Wed Jan 27, 2021 3:21 pm
by Pablo
This form template was designed to upload files to a folder, it does not send emails.
Also the the built-in form script should not enabled.
To send an email with attachment this script cannot be used. Instead use the built-in form script with PHP Mailer.
Re: File upload
Posted: Wed Jan 27, 2021 3:38 pm
by windsurfer
The page that i send you to does send emails and was not built with a 3rd party extension, it was built with the built in script that is called Form Processor: File Upload through the form wizard. If the script i was using doeasn't send the file as an attachment then why is there a choice to have the file uploaded to a file folder on the server.
Doesn't make a lot of sense to me.
I removed that and selected the File Upload under the Form Controls and it works.
Re: File upload
Posted: Wed Jan 27, 2021 3:43 pm
by windsurfer
Is there a way to specify the file extensions allowed and the max size of the file ?
Re: File upload
Posted: Wed Jan 27, 2021 3:55 pm
by Pablo
You can either use the form wizard to create a form based on a template. This adds a custom script
OR
You can create a form from scratch using the built-in form script.
Only one form processor can be active at the same time.
The maximum file size can be set in the form properties.
The accepted file extensions can be set in 'Validation' properties of the 'File Upload' element
Re: File upload
Posted: Wed Jan 27, 2021 4:17 pm
by windsurfer
I see where i can set the file type but not the max size
Re: File upload
Posted: Wed Jan 27, 2021 4:42 pm
by Pablo
Form -> Properties -> Advanced -> File Upload
Re: File upload
Posted: Wed Jan 27, 2021 4:47 pm
by windsurfer
That is when the file uploads to a folder which we both know is not what i want.
Re: File upload
Posted: Wed Jan 27, 2021 6:09 pm
by Pablo
The setting also applies to attachments
Re: File upload
Posted: Wed Jan 27, 2021 6:23 pm
by windsurfer
When i select and check the Upload files to a folder on the server i can set the desired max size. if i select a bigger file on the form it acts as if it is submitting the file without an error message that the file is too big and i don't receive an email and it doesn't upload to the folder which if the file is not to big the email i receive has a link to the file. it also uploads it to the folder on the server but doesn't attach to the email. I cannot have those file go to the server since they would contain extreme personal financial information so that is not an option. So so far things are not working very well for me.
Re: File upload
Posted: Wed Jan 27, 2021 6:35 pm
by BaconFries
if i select a bigger file on the form it acts as if it is submitting the file without an error message that the file is too big and i don't receive an email and it doesn't upload to the folder
If the file is not uploaded to the folder due to the size outwith what you have set (if memory serves 4mb max) then it is due to file size restrictions of your host. To resolve contact them and ask if it is possible to increase the size of file(s) that can be uploaded.
Re: File upload
Posted: Wed Jan 27, 2021 6:49 pm
by Pablo
The built-in script implements basic form functionality. All the available options were implemented based on user feedback.
But if you do not like the built-in functionality, then you can always create your own script.
Or you can post a feature request in 'Suggestions' section of the forum for future development.
Note that some features are limited by the host. For example, if host does not allow large files to be uploaded or sent then the script will silently fail because there is no way to detect this.