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 6072457
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:09:45+00:00 2026-05-23T10:09:45+00:00

I am using Valum’s file uploader: http://valums.com/ajax-upload/ To upload files via PHP. 1. I

  • 0

I am using Valum’s file uploader:
http://valums.com/ajax-upload/

To upload files via PHP.

1.
I would like to use the size of the file upload in the onComplete call,
but I do no know how to get the size of the file just uploaded.
I know how to get the fileName using this,

onComplete: function(id, fileName, responseJSON){
    fileName //is the filename, but what about the file size?
}

But I do not know how to get the file name (from the JavaScript, through PHP I can but that isn’t much help here).

2.
Also during the onComplete call, I would like to be able to access the list item <li> that the file upload script creates below the upload button.
When I inspect them with fire-bug I can only see that they have a class, and not an ID.
I want to hide each one once I have complete the other stuff in my onComplete, but do not want to also hide the rest of the files in the queue.

3.
When a file is being uploaded, If the file already exists I would like a message to pop-up and ask the user if they want to overwrite the file. I would like there to then be 3 options,
one where the file is not overwritten and the upload is cancelled, one where the file is not overwritten, but the new file is uploaded and a version number is added (eg, test.txt becomes testv2.txt, similar to the default now), and three where the old file is overwritten with the new file.

I can probably figure out the PHP to this quite easily, but what I need help with is understanding how the variables are passed between the pages using json/jquery/ajax/etc.

Any help with any of these questions would be much appreciated.

  • 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-23T10:09:46+00:00Added an answer on May 23, 2026 at 10:09 am
    1. php.php line 301

      return array(‘success’=>true);

    you can add your own values in here eg

    return array(‘success’=>true,’foo’=>bar);

    and retrieve them on the front

    onComplete: function(id, fileName, responseJSON){
        alert(responseJSON["foo"]);
    }
    
    1. Add an id to the list item

    2. use onSubmit: to call an ajax request to check if the file exists

    Hope this helps

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the Valums Ajax Uploader to upload a batch of files. We
I've been playing with Valum's AJAX upload script: http://valums.com/ajax-upload/ It ticks all the boxes
I'm using valums ajax file-uploader My nodejs server side looks like this: fileStream =
I am currently using Valums JQuery File Upload plugin. The plugin is very convenient
I am trying to use Valum's Ajax Upload to do file uploads on a
i'm using Valums Ajax uploader. all works great in Mozilla with this code: View:
I'm using valums Ajax upload to upload images. I have mulitple upload buttons on
I'm using Valum's AJAX uploader, which is quite nice. I have a form that
I'm trying to do a ajax file upload using django. I am trying to
I would like create a database using value from a variable. Here my script

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.