1

I am using this script

It works well, but I want to sort the results by placing the last image at the beginning of the list and not at the bottom. As the MySql ORDER BY.... Can anyone help me? thanks

2
  • What do you mean As the MySql ORDER BY? Commented Sep 9, 2013 at 19:38
  • is just an example to understand what I want Commented Sep 9, 2013 at 19:58

2 Answers 2

3

Good news! It's built right into the functionality as a configurable option. Do this:

  1. Open "jquery.fileupload-ui.js"
  2. Search for "prependFiles:" (minus the quotes)
  3. Change the value of "false" on this line to "true" (again, minus the quotes)

Your code will look like this when done:

// By default, files are appended to the files container.
// Set the following option to true, to prepend files instead:
prependFiles: true,
Sign up to request clarification or add additional context in comments.

Comments

0

The option you want is called: prependFiles

By default, files are appended to the files container.

Set this option to true, to prepend files instead.

Type: boolean

Default: false

( the above is from https://github.com/blueimp/jQuery-File-Upload/wiki/Options#prependfiles )

You do not need to edit any core files such as jquery.fileupload-ui.js !!

Instead just initialize your fileUpload component like this:

$('#fileupload').fileupload({
    prependFiles: true
});

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.