Failed File upload action for dropzone's with CS forms

Hello,

I am encountering an issue with the Dropzone element from Cornerstone Forms.

I have added two dropzone’s with each a unique name. Set the accepted type’s and limit the amount of entries to 1 without having it be required. For both dropzone’s i have created a seperate File Upload Action with the name set the corresponding dropzone. Create media is turned on and allow multiple is turned off.

When submitting an entry without file selected it gives the following error: “File Upload Action (CV) : Failed to sideload image: : Specified file failed upload test.”

When i select a file the submission runs smoothly without problems.

I have tried the same setup with the regular file input and that one works perfectly with the actions.

Also i have two somewhat related questions:

  1. the uploaded file isn’t shown in the Form data table at the submissions. Is this something that will be added soon?
  2. Will there be a way to set the max file size with the dropzone or file input elements?

Thanks in advance!

Regards,

1 Like

So i seem to have found a workaround/solution.

There’s an condition ‘File upload’ that can be set to exists with the value of the dropzone input name on the file upload action. This makes sure the file upload action doesn’t get get triggered if no file is uploaded.

Not sure if this was the intended way but this works for me.

Yes the File Upload exists condition is meant to be used for this. Currently if you try to upload a file that is not there, we assume the form was not filled in correctly or you have not setup the action correctly. Let me know if that explanation helps. Have a great day.

That seems logical. So I will keep it like this.

However i’m wondering if adding the validation setting is on your roadmap. Currently the required error only shows in English with the name of the element (Uploading a file is required in the dropzone).

And did you have time to take a look at my other two questions?

  1. the uploaded file isn’t shown in the Form data table at the submissions. Is this something that will be added soon?
  2. Will there be a way to set the max file size with the dropzone or file input elements?

That required message is in the cornerstone.pot file. A translation plugin should let you change that per your language.

  1. I am working on a feature to auto upload to the media manager from a file input. From there it would show a link in the dashboard linking to it. It doesn’t work like that by default as you might want to upload a hidden file for sensitive information.
  2. It’s tied to your max WordPress upload size right. I can add in a control to change that.

Have a great day

1 Like

Hi Charlie,

I have been using the validation fields for the translation of the required message but it seems logical to translate that with WMPL and/or another translation plugin.

  1. I assumed with the toggle for ‘Create Media’ in the file upload action that this feature would already be implemented, but its great to hear that this is something you are working on!
  2. I would love to have a control to change the file upload limit for each file input separately since the restriction of the size can vary a lot based on the context of the file upload needed in our case.

Thanks a lot for your help and quick responses. I will wait patiently for the upcoming updates.

Thank you for your feedback, @100leiden

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.