What is the best way to upload files with Ajax?


I could get a code on the internet paste here and try an answer but I'd rather have it help me with the logic and programming of a script to upload images in Ajax. I do not know how to start, I'm a beginner but I already know some things about jQuery and Ajax. In this upload I will register 5 fields in the database that are;

id, nome(md5), titulo, descricao, datacadastro
asked by Marcos Vinicius 05.08.2014 в 15:23

2 answers


One tip is you upload the content separately.

Make a command with the programming language you will use, making an INSERT for the data like name, title, etc.

After the SQL command to insert only the content, make a page or a block on the same page with this jQuery upload plugin:


In this plug-in, it multi-uploads using PHP, jQuery and MySQL, as well as having many options like specifying allowed extensions, drag & drop files for upload ', upload progress bar, upload response output and etc.

I used this plug-in and I did not regret it, because it helped my need 100%.

27.08.2014 / 15:15

A simple way to do this is to find here .

I only add ...

Suggested libraries and classes are all valid and will show you "the path," but if you want to try deploying on your own then start doing without Ajax.

Start the form, then get the data (the images) by php, resolve the DB issue, and finally deploy Ajax.

The link I gave you should help you.

28.08.2014 в 21:09