• Resolved joeludd

    (@joeludd)


    Hello, and thanks for this plugin!

    I need users who are not logged in to be able to upload files to the form.

    The file field is required and I can select a file and it passes when I submit, but when I look in entries it says no file selected.

    Any idea what I’m doing wrong?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author fabianlindfors

    (@fabianlindfors)

    Hi, I’m glad you’re liking it!

    When doing guest file uploads ACF automatically switches the WordPress media uploader for a regular file input. Unfortunately it doesn’t handle these files automatically and you will need to process them manually like a regular PHP file upload. Here is a simple guide: https://www.w3schools.com/php/php_file_upload.asp

    Thanks for bringing it up! Going to think about a nice way of integrating this in the plugin. It’s a difficult issue as there are many different use cases of regular file uploads and you might not always want to create a WP media post.

    Hope I could help!

    Would it be possible that your plug-in looks at the current active user (with the minimum role to be able to upload/use media) and that your plugin then disables the acces to the media libray, and only allows file uploads?

    With that in mind I can just make one guest account (with the right role) for anyone who wants to submit the form, including media upload.

    Thanks,

    Peter Luit

    Plugin Author fabianlindfors

    (@fabianlindfors)

    That’s a good idea, Peter!

    I have also been thinking about a solution similar to acf_form which takes an argument for “uploader”. Through that you can specify if you want the basic or WP uploader to be used. This way you could simply change a parameter for users of certain roles to show them the basic uploader instead.

    How does that solution sound to you?

    Plugin Author fabianlindfors

    (@fabianlindfors)

    Hello again!

    I just wanted to inform you guys that the latest version of AF that I just published (1.0.4) includes the argument I talked about in my last response. It’s now possible to pass an uploader argument to the form which specifies which upload method to use.

    Check out the documentation: https://advancedforms.github.io/guides/basic/displaying-a-form/

    Hope this helps!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Guest file upload’ is closed to new replies.