Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 944385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T22:35:00+00:00 2026-05-15T22:35:00+00:00

I am facing a really weird problem. I am using swfupload to upload multiple

  • 0

I am facing a really weird problem. I am using swfupload to upload multiple images to the ImageShack server. I am also storing the returned URLs in the database. How do I show the URL returned from ImageShack to the user as soon as I receive it? Is there any way to make swfupload return the URL once upload finishes? Here is the code that I use for uploading images:

$('#swfupload-control').swfupload({  
    upload_url: "<%= upload_url-%>",  
    file_post_name: 'photo',  
    post_params: {"authenticity_token" : "<%= form_authenticity_token %>"},
    file_size_limit : "100024",  
    file_types : "*.jpg;*.png;*.gif",  
    file_types_description : "Image files",  
    file_upload_limit : 5,  
    flash_url : "/flash/swfupload.swf",  
    button_image_url : '/javascripts/swfupload/XPButtonUploadText_61x22.png',  
    button_width : 62,  
    button_height : 22,  
    button_placeholder : $('#button')[0],  
    debug: false  
})  
.bind('fileQueued', function(event, file){  
    var listitem='<li id="'+file.id+'" >'+  
        'File: <em>'+file.name+'</em> ('+Math.round(file.size/1024)+' KB) <span class="progressvalue" ></span>'+  
        '<div class="progressbar" ><div class="progress" ></div></div>'+  
        '<p class="status" >Pending</p>'+  
        '<span class="cancel" >&nbsp;</span>'+  
        '</li>';  
    $('#log').append(listitem);  
    $('li#'+file.id+' .cancel').bind('click', function(){
        //Remove from queue on cancel click  
        var swfu = $.swfupload.getInstance('#swfupload-control');  
        swfu.cancelUpload(file.id);  
        $('li#'+file.id).slideUp('fast');  
    });  
    // start the upload since it's queued  
    $(this).swfupload('startUpload'); 
}) 
.bind('fileQueueError', function(event, file, errorCode, message){ 
    alert('Size of the file '+file.name+' is greater than limit'); 
}) 
.bind('fileDialogComplete', function(event, numFilesSelected, numFilesQueued){ 
    $('#queuestatus').text('Files Selected: '+numFilesSelected+' / Queued Files: '+numFilesQueued); 
}) 
.bind('uploadStart', function(event, file){ 
    $('#log li#'+file.id).find('p.status').text('Uploading...'); 
    $('#log li#'+file.id).find('span.progressvalue').text('0%'); 
    $('#log li#'+file.id).find('span.cancel').hide(); 
}) 
.bind('uploadProgress', function(event, file, bytesLoaded){ 
    //Show Progress 
    var percentage=Math.round((bytesLoaded/file.size)*100); 
    $('#log li#'+file.id).find('div.progress').css('width', percentage+'%'); 
    $('#log li#'+file.id).find('span.progressvalue').text(percentage+'%');
}) 
.bind('uploadSuccess', function(event, file, serverData){ 
    var item=$('#log li#'+file.id), fetchedfile;  
    item.find('div.progress').css('width', '100%'); 
    item.find('span.progressvalue').text('100%'); 

    var pathtofile='<a href="'+fetchedfile+'" target="_blank" >view &raquo;</a>'; 
    item.addClass('success').find('p.status').html('Done!!! | '+pathtofile); 
}) 
.bind('uploadComplete', function(event, file){ 
    // upload has completed, try the next one in the queue 
      
    $(this).swfupload('startUpload');  
});

There is no inbuilt callback function for fetching the URL of the uploaded image file in the swfupload documentation.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T22:35:01+00:00Added an answer on May 15, 2026 at 10:35 pm

    Oh, it was simple. uploadSuccess returns serverData!

    .bind('uploadSuccess', function(event, file, serverData){ 
        var item=$('#log li#'+file.id), fetchedfile;  
        item.find('div.progress').css('width', '100%'); 
        item.find('span.progressvalue').text('100%'); 
        fetchedfile = serverData;
        var pathtofile='<a href="'+fetchedfile+'" target="_blank" >view &raquo;</a>'; 
        item.addClass('success').find('p.status').html('Done!!! | '+pathtofile); 
    }) 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

this time, I'm facing a really weird problem. I've the following code: $xml =
I´m currently facing a really weird (at least for me) problem regarding the configuration
I am using Hibernate and I am facing with a really annoying problem, when
I'm currently facing a problem which I can not resolve and I really don't
Facing a problem, it seems my data stored in SQL Server does not stored
I'm facing a problem that's really strange. It's in every browser. Everything is working
I am really really tired these day because of facing this problem. I am
I'm fixing a program but I'm facing a problem and I cant really realize
I'm facing a wordpress / htaccess problem. This should be really simple, but it's
I am facing a really strange problem with Core Data. Let's describe it: Definitions

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.