Remove file field after Transloadit upload

Santiago's Avatar


28 Oct, 2013 10:14 AM

Hi everyone,

I'm using Transloadit at my site to avoid server load while uploading files, but I've just realised the user file is being uploaded to my server after Transloadit process.

How can I remove the file field from my form after Transloadit process to just get transloadit response so my server not to receive the user file?

  1. 1 Posted by Francisco Azeve... on 28 Oct, 2013 10:32 AM

    Francisco Azevedo's Avatar

    Hi santiago,
    If you get files you are defining a transload export robot. On that robot you can define files that you want to get.

    Francisco Azevedo

  2. 2 Posted by Santiago on 28 Oct, 2013 12:24 PM

    Santiago's Avatar

    Thanks Francisco.

    The actual problem is that I've got this field at the form:

    <input type='file' name='image'>

    That field is the one used by Transloadit to process and upload my file to Amazon S3, and its populated by the user.

    Since transloadit is doing all the work, my server doesn't need the receive that file, but the form is sending me it any way.

    I'm thinking about removing the field after Transloadit success:

    = transloadit_jquerify "form", {onSuccess: "function(){$('form').find('input[type=file]').remove(); }"}

    Is it a good approach?

  3. Support Staff 3 Posted by Tim Koschützki on 28 Oct, 2013 02:29 PM

    Tim Koschützki's Avatar

    Hey Santiago,

    if the form is using our jQuery plugin (and it seems it does), it should not send you the file at all. Do you have any special kind of integration that might make this possible?

    Do you mind sharing your custom javascript code that calls our jQuery plugin?

    Kind regards,

    Co-Founder Transloadit

  4. 4 Posted by Francisco Azeve... on 28 Oct, 2013 03:39 PM

    Francisco Azevedo's Avatar

    Hi Santiago,
    As Tim said, your transloadit form will not send file to your server.
    When someone clicks on file chooser, file will be uploaded to transloadit servers. Then, after upload, user can upload another one, or click on a optional submit button if you created inside form. If user clicks on that submit button, you will receive a transloadit information string only about latest upload.. and you should not receive file data.

    An optional javascript code to hide form or file field after onsucess sounds good too. The only problem i see here is that, if user uploads a wrong file and wants to change and upload a better file, he as no option, because file field will be removed on first upload.

    Francisco Azevedo

  5. 5 Posted by Santiago on 29 Oct, 2013 12:43 PM

    Santiago's Avatar

    Hi again! Thanks so much for the answers. The file keeps beeing uploaded to my server.

    Here is a mock of my form:

    <form accept-charset="UTF-8" action="/users/1" class="edit_user" enctype="multipart/form-data" id="update_user_1" method="post">
        <input name="params" type="hidden" value="{&quot;template_id&quot;:&quot;BBBBB&quot;,&quot;auth&quot;:{&quot;key&quot;:&quot;AAAAAA&quot;,&quot;expires&quot;:&quot;2013/10/29 13:01:51+00:00&quot;}}"><input name="signature" type="hidden" value="3c82171333541635adfeb392c5ecb11b6a475da0">
        <input id="user_avatar_chooser_1" name="user[avatar]" type="file">
        <script type="text/javascript">
              jQuery(function($) {
                var script = '//';
                $.getScript(script, function() {
                    .attr('enctype', 'multipart/form-data')
                    .transloadit({"wait": true,
        "processZeroFiles": false,
        "triggerUploadOnFileSelection": false,
        "modal": false,
        "onSuccess": function(){$('#update_user_1').find('input[type=file]').remove(); }});
        <input class="real_submit" name="commit" type="submit" value="">

    You can see the function I'm proposing at "onSuccess"

  6. Support Staff 6 Posted by Tim Koschützki on 04 Nov, 2013 05:03 PM

    Tim Koschützki's Avatar

    Hey Santiago,

    do you still have this problem?

  7. 7 Posted by Santiago on 04 Nov, 2013 05:16 PM

    Santiago's Avatar

    Sure, I'm using the approach I've describing at my previous post, but it looks little solid. You said Jquerify plugin should autoremove my file input but somehow it's not working.

    Thanks for the help.

  8. Support Staff 8 Posted by Tim Koschützki on 05 Nov, 2013 06:40 AM

    Tim Koschützki's Avatar

    Can you please post a link to where you have this online? I need to see it in action.


  9. 9 Posted by Santiago on 06 Nov, 2013 08:19 AM

    Santiago's Avatar

    Hi Tim, Thanks so much.

    You can check it out at

    If you create an account, you can find it at "Account" option while changing your avatar, of while creating a new Service of managing your images.

    If creating an account it's not a good idea here you can create a service without an account:
    Choose "I offer" > "General Service" > "+ Cover photo"

  10. Support Staff 10 Posted by Tim Koschützki on 13 Nov, 2013 06:21 AM

    Tim Koschützki's Avatar

    Hey Santiago,

    sorry for the delay.

    I just tried it and it worked fine. I also could not find any reference to Transloadit in the source code. I went to "Edit profile" -> View Page Source -> and search for "transloadit" and nothing came up. Can you please point me to the script file that has this?

    Kind regards,

    Co-Founder Transloadit

  11. Support Staff 11 Posted by Tim Koschützki on 10 Dec, 2013 06:45 AM

    Tim Koschützki's Avatar

    I am going to close this ticket for now. Please feel free to reopen it again if you have further questions.

    Kind regards,

    Co-Founder Transloadit

  12. Tim Koschützki closed this discussion on 10 Dec, 2013 06:45 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

20 Feb, 2015 08:51 AM
18 Feb, 2015 08:08 AM
04 Feb, 2015 03:32 PM
13 Jan, 2015 09:05 AM
21 Nov, 2014 09:46 AM


07 Oct, 2014 02:06 PM
07 Oct, 2014 09:34 AM
07 Oct, 2014 06:13 AM
29 Sep, 2014 12:52 PM
25 Aug, 2014 12:05 PM
14 Aug, 2014 07:02 AM