When I select a file and click the upload arrow, it just turns red. I’m sure it’s due to my php file not capturing the upload correctly, but there is no error output to guide me. Also, the documentation for uploading files seems almost non-existent.
I copied the example php code and I am using it, but it’s just not helping.
My questions:
How do I upload a file so it doesn’t error out?
If the file uploads prior to the rest of my form being submitted, how do I connect the file to my form again when the form submits? It seems that uploading the two things separate from one another would separate them.
Do you use ‘dhtmlxform_item_upload.php’ file from the dhtmlxForm package?
php returns something like “{state: true, name:‘file_name.ext’, extra: {info: ‘just a way to send some extra data’, param: ‘some value here’}}”
I am not clear what you want in second question. Please can you show/attach simple example?
An example shouldn’t be necessary for this. I’m not looking for anyone to troubleshoot my code as much as just trying to understand what is occurring. Once I understand it, I should be able to troubleshoot my own code.
Let me try to expand on my second question:
Normally (without DHTMLX), when you submit a file in an HTML form, it sends the file along with any other form name/value pairs. So, this:
[code]
(this might not be exact syntax, but you get the idea)
Using the DHTMLX uploader, you upload your file first and later you submit the form. So, where does the file go after it’s uploaded and before I submit my form? Is it held in the user session? If so, how do I get it once the form is submitted?
The params I append to the cgi call are not being seen by the post, presumably because this is a POST and not a GET. How do I either 1. tell the post where to put the file, or 2. get the file location after the POST is done?
I can’t figure out how to get that info back into my .js files.