1

I am using 'Uploadify' JQuery plugin for file upload. I read the documentation and referred examples and attached the code in my file. Everything works well except that after uploading the file, the file name just disappears. You can find the documentation here.

The documentation says about "onComplete" option, but I am not following how to implement below:

<input id="btnBrowse" name="btnBrowse" type="button" value="Browse"/>
            <script type="text/javascript">// <![CDATA[
                $(document).ready(function() {
                $('#btnBrowse').uploadify({
                'uploader'  : '../Lib/uploadify.swf',
                'script'    : '../Lib/uploadify.php',
                'cancelImg' : '../Lib/cancel.png',
                'auto'      : true,
                'folder'    : '../../upload'
                });
                });
            // ]]></script>

I also want to show the message that file successfully uploaded.

Please assist.

2 Answers 2

4

http://www.uploadify.com/forum/viewtopic.php?f=7&t=58

in your case:

<script type="text/javascript">// <![CDATA[
$(document).ready(function() {
$('#btnBrowse').uploadify({
'uploader'  : '../Lib/uploadify.swf',
'script'    : '../Lib/uploadify.php',
'cancelImg' : '../Lib/cancel.png',
'auto'      : true,
'folder'    : '../../upload',
'onComplete': function(event, queueID, fileObj, reposnse, data) {
     //Do something here using the parameters as they defined in the docs
 }
});
});
// ]]></script>
Sign up to request clarification or add additional context in comments.

4 Comments

Ok, thanks. I also want to keep showing the uploaded file's name there.
Hii @David I have problem in jquery conflict. Do you have the file of jquery and uploadify jquery file with proper versionthen can you send me? I have tried with many version but no luck
@Bhavin Unfortunately not. It's been a while and I am not working with Uploadify any more.
Okay Bro thanks for your comment. By the way I have solved the issue. My Mistake is not enabled flash player allow for particular project or website URL in google chrome browser because i don't know exact requirement of free Uploadify plugin (This is too old plugin).
0

If you want to show the filename of what was uploaded, you can either access the file object, which has properties such as the file name, path and size, or manipulate the response your uploader script returns to include the details of the file you want.

Bear in mind that the the file object only contains what you submitted, not what was actually written to the server, so if your uploader does any file name manipulation (to deal with duplicates), then you'll need to return the correct file details in the response and use that instead.

Hope that helps!

Dano

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.