Ajex file upload, post array incorrect

timomer

Member
Hi,

I have a Ajex file upload on a form, once saved it passing POST data to a new form where I wish to use GET to extract the Array of files selected. But, the URL comes out like this:

Code:
com_fabrik&view=form&formid=6&___upload_button[value]=%2Ftmp%2F20140801.gpx&___upload_button[value]=%2Ftmp%2F20140801_-_Copy.gpx

You can see my two values:

Code:
&___upload_button[value]=%2Ftmp%2F20140801.gpx
&___upload_button[value]=%2Ftmp%2F20140801_-_Copy.gpx

I should be able to read these as an array, but all I get is the last value. I believe the issue is due to the "[value]" being added, this should be "[]".

I thought hugh found this issue in this thread: http://fabrikar.com/forums/index.ph...-being-sent-of-form-submit.40086/#post-202090

But updating to the most resent github for the file upload element and testing this code did not help.

Am I correct this is an error in the POST data being passed?

Many thanks,
tim
 
Hey Hugh,

I have one form that handles the file Upload with a File Upload Element, it has a Redirect Plug-in that Jumps to a new form and has "Append jump url with data" selected.

The second form has a PHP Plugin that runs "onLoad", this uses $_GET to read the vars in the URL for processing (in this example I want to read the array of files uploaded). Normal vars read fine, but I cannot read in the files Array. I believe this is due to the POST data being formatted incorrectly?

-tim
 
Hey,

No I have not and will look into that, thank you troester.

Im guessing there is still an issue with this Fabrik form feature that needs to be addressed, unless I am doing something incorrectly?
 
Hi troester, Hugh,

troester - I looked at jinput but ended up with the same result where I can only access the last value of the array. From what I have read and understood this is due to the file variables are not correcty declared as an array in the URL.

My GET request url again...
Code:
option=com_fabrik&view=form&formid=6&___upload_button[value]=%2Ftmp%2F20140902.gpx&___upload_button[value]=%2Ftmp%2F20140902_-_Copy.gpx&___userid=370#_=_

If im correct, the issue is due to '___upload_button' not being seen as an array and this is due to Fabrik not creating the URL correctly?

Please do correct me if im wrong, is the URL above correct if '___upload_button' should be seen as an Array in a GET request?

Many thanks,
tim
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top