Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
By Somayeh
#829844
Hi
i have a fileUploader in form and save it by json encode.
and then i wanna set it from database by ajax and by JSON.parse or json_decode().
i tried some but i could not show data in fileuploader in my form.

"filxtasavirmalk" is my fileuploader. who can help me???

var host = PMDynaform.getHostName();
var ws = PMDynaform.getWorkspaceName();
var token = PMDynaform.getAccessToken();
var app_uid = PMDynaform.getProjectKeys().caseUID;
var trig_uid = "27808216861497bd5d107f3041511529"; // what is this id? it is id for trigger show details.

function my_function() {
$.ajax({
type: 'PUT',
url: host + '/api/1.0/' + ws + '/cases/' + app_uid + '/execute-trigger/' + trig_uid,
data: {
id: $('#save_id').getValue()
},
beforeSend: function(xhr) {
xhr.setRequestHeader('Authorization', 'Bearer ' + token);
}
}).done(function(data) {

if (data.data != null) {

// $('#filxtasavirmalk').setValue(JSON.parse(data.data[1].filxtasavirmalk));

$('#filxtasavirmalk').setValue(data.data[1].filxtasavirmalk);




}
By marceloayllon
#830025
Hi Somayeh ,

Could you give me more information? if there is an error when using the JSON or in the server?

if you save a file in JSON form, you must know that there is also a limit to sending through POST post_max_size.

I pass you the documentation maybe it will help you.
https://wiki.processmaker.com/3.0/Changing_the_ProcessMaker_Configuration#Increasing_the_maximum_size_of_uploaded_files
Error While Importing

Is it possible that the file that you are trying[…]

Version 5.4) inside workflow>public_html direct[…]

I'm new in processmaker and I need help in this si[…]

The forum content that you shared with me has prov[…]