Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

file_get_contents error for upload fields #1674

Open
green17 opened this issue Dec 9, 2024 · 0 comments
Open

file_get_contents error for upload fields #1674

green17 opened this issue Dec 9, 2024 · 0 comments
Labels
issue Something isn't working correctly

Comments

@green17
Copy link

green17 commented Dec 9, 2024

What happened?

We recently upgraded from Freeform 3 to 4, along with upgrading Craft CMS from version 3 to 4. Our setup includes several file systems configured without public URLs for security reasons. When using the upload field with a standard, publicly accessible file system, everything functions as expected. However, when we use a file system without a public URL, the form fails to submit and generates an error - file_get_contents(test/file.pdf): Failed to open stream: No such file or directory.

Although the file is successfully uploaded to the correct location, the form will not submit.

Errors and Stack Trace (if available)

No response

How can we reproduce this?

  1. In Craft's filesystem settings, toggle the "Files in this filesystem have public URLs" to off for a filesystem.
  2. In the form builder, choose this filesystem as the asset source for a file upload field.
  3. When the form has loaded on the front end, choose a file to upload and submit the form.

Freeform Edition

Pro

Freeform Version

4.1.23

Craft Version

Craft Pro 4.13.5

When did this issue start?

After upgrading from older Freeform version

Previous Freeform Version

3.x

@green17 green17 added the issue Something isn't working correctly label Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue Something isn't working correctly
Development

No branches or pull requests

1 participant