I'm trying to work with the {exp:channel:form}, and I'm not able to upload files from a front-facing form.

I keep receiving "button_1: The upload path does not appear to be valid." when trying to update to the channel. The website is currently using the MSM with EE and is a subdomain with our main site. We have been avoiding an issue where all of our file URLs are structured similar to "https://[main_site].com/[subdomain].[main_site].com/images/site_uploads/[file_name]" because of how our files are set up in our server and I have a feeling that this issue has finally caught up to us with the channel forms.

Here is the code below, just in case if I'm missing something as well. All text type fields are able to be edited, the only issue with the form is just the file uploading.

{exp:channel:form channel="resources" entry_id="2780" return="[redacted URL]" include_assets="no"}
<div class="row">
        <div class="col">
            <label for="btn-1">Button 1:</label>
            <input type="text" id="btn-1" name="button_1_label" value="{button_1_label}">
        <div class="col">
            {button_1}<div class="btn-1-col">
                <label for="btn-1-file">Button 1 File:</label> 
                <a target="_blank" href="https://[main_site].com/[subdomain].[main_site].com/images/site_uploads/{file_name}"> Preview &nbsp;
                    <img src="https://[main_site].com/[subdomain].[main_site].com/images/site_uploads/file-preview.png" height="25px" width="25px">
                <div class="delete-1-file"></div>
            $(document).ready(function() {
                $('.delete-1-file').click(function() {
                    $('.btn-1-col').html("<label for='btn-1-file'>Button 1 File:</label><input type='file' name='button_1' value='{file_name}'> 
<input type='hidden' name='button_1_directory' value='15' /> <input type='hidden' name='button_1_hidden_directory' value='15'");

The value set for the upload directory is also correct. Here is the upload directory link: https://[main_site].com/[cpanel].php?/cp/files/directory/15&S=[data]

Can somebody verify that it's not just a syntax error?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.