There are several ways to implement a no-refresh upload file in the Web:
1. Use Formdata and FileReader in HTML5 to implement. However, this method can only be used after IE10.
2. Use the SWF file to do the relay.
3. Submit using a hidden iframe.
The above 2 and 3 are actually similar.
I found in Drupal 7 that the field Content-type as image can be uploaded without a flush.
I didn't know how it was done for half a day. My conclusion is that the first and second types can be excluded at this time. But the third I did not find the presence of an IFRAME within HTML.
Solving!
Thank you!
Reply to discussion (solution)
You have the code, you don't know what's going on.
I don't have the code, how do I know what's going on?
Baidu, Google a lot of things without refreshing upload, do not limit these three kinds of it! As you say, you've already ruled out the three kinds of possibilities, so ...
You have the code, you don't know what's going on.
I don't have the code, how do I know what's going on?
This is DRUPAL7 built-in functionality and should be implemented in the built-in module/file/. But to DRUPAL7 source is not familiar, have Drupal master have research?
Baidu, Google a lot of things without refreshing upload, do not limit these three kinds of it! As you say, you've already ruled out the three kinds of possibilities, so ...
Thank you, Xuyanlu, but I was trying to figure out how Drupal was implemented. :)
I found it myself.
Drupal introduced the jquery.form.js.