Question about redirect URL and POST/GET

Archived from the Transloadit support forum. Originally posted on August 9, 2012; details may be outdated, see our docs for current behavior. Original thread

I am adding a more straightforward implementation of the upload process, using the jQuery plugin but wanting a more normal form submission when the Transloadit work is completed. However, I must once again be doing something a bit incorrectly.

I have only included what I think are the pertinent portions of my fairly large form here for convenience…

I have the following params:

$params = array(
    'auth' => array('key' => 'REDACTED'),
    'template_id' => 'REDACTED',
    'redirect_url' => "http://dev.talentville.com/uploadfinished.php"
);

Then, I have the following form (in part):

<?php
 echo '<input type="hidden" name="params" value="' . htmlentities(json_encode($params)) . '" />';
?>

…
…

Then I have the following javascript code:

$('#upload_snippet').transloadit({
    wait: true,
    fields: true,
    exclude: "uploadpicture",  // Note that I also have an optional picture upload on the form, an avatar for the document
    modal: true
});

The deal is that when the redirect URL is called after the upload and conversion is completed, the following is the URL in my browser:

http://dev.talentville.com/uploadfinished.php?assembly_id=REDACTED&assembly_url=http://api2.jacquelyne.transloadit.com/assemblies/REDACTED

I can see that the Transloadit work was done and the file was transferred to my S3 account, but I thought I was supposed to get everything sent to my form action via the recirect URL, and I am expecting a POST variable named “transloadit”, not two variables called “assembly_id” and “assembly_url”, which I thought was only tied to the notifications URL, which I am not using here since I am waiting for the conversion to complete.

What am I doing wrong, and why are the rest of my form parameters not getting forwarded to my form? I know this is a very simple problem and I just do not get it, so I need help again to get this working.

Thanks, I hope I included enough information for you to know what I did wrong.

Ben Cahan
Talentville.com

Do you see any JavaScript errors before / while hitting the upload button? It looks like that is what is happening here.

Felix,

I am not quite sure how to see if there are javascript errors after the click of the upload button since I am eventually redirected to the redirect URL. What I will say is that the upload progress overlay is not showing up on the screen (the Transloadit progress bar), so that is odd. I do see the Uploading percentage int he little URL bar at the bottom of the browser, counting up the percentage of the upload, but not the blue bar that usually is there when using your plugin.

I can certainly walk someone through the process via skype if that is what is needed, I am using my development subdomain to test this…perhaps this is more about my not being able to diagnose the problem properly.

ben

I can certainly walk someone through the process via skype if that is what is needed, I am using my development subdomain to test this…perhaps this is more about my not being able to diagnose the problem properly.

We don’t have the resources to provide this level of 1 on 1 support at this point : /.

The fact that our modal dialog is not popping up is a sure sign that there is a problem with your integration or that a JS error is occurring. Once you fix that, the redirect_url will work as expected.

Just saw Tim invited you to add him on Skype - so I guess if you can catch him during a free minute, you’re in luck ; ).

I sent him a skype message about this, hopefully he will see it and refer to the support ticket for the details, I am happy to walk him through the actual operation at the site.

Ben Cahan

I will take apart my upload code until I get the modal dialog working, then perhaps that will show the problem. Thanks for the tip, I will let Tim know if the issue remains.

Ben

Felix,

Thanks for the tip, problem solved, I forgot the “id=” in the form so the plugin did not get connected. Oops, it is working fine now.

i will close the discussion.

Ben