|
@@ -6015,7 +6015,12 @@ function dopasteImg() {
|
|
|
formData.append(self.filePostName, myBlob, "untitled." + t.split('/')[1]);
|
|
|
//formData.append('imgFile', b);
|
|
|
formData.append('dir', isImg ? 'image' : 'file');
|
|
|
- xhr.open('POST', self.uploadJson);
|
|
|
+ if (self.uploadYunJson && self.uploadYunJson.domain) {
|
|
|
+ xhr.open('POST', self.uploadJson.domain);
|
|
|
+ } else {
|
|
|
+ xhr.open('POST', self.uploadJson);
|
|
|
+ }
|
|
|
+
|
|
|
xhr.onreadystatechange = function () {
|
|
|
if (xhr.readyState == 4&&xhr.status == 200) {
|
|
|
// if (fn) {
|
|
@@ -10112,15 +10117,30 @@ function autoImg(self) {
|
|
|
$(img).each(function (i) {
|
|
|
var that = $(this);
|
|
|
var host = gethost(self.uploadJson);
|
|
|
+ if (self.uploadYunJson && self.uploadYunJson.host) {
|
|
|
+ var yhost = gethost(self.uploadYunJson.host);
|
|
|
+ }
|
|
|
+
|
|
|
if (that.attr("src").indexOf("http://") >= 0 || that.attr("src").indexOf("https://") >= 0) {
|
|
|
var n = gethost(that.attr("src"));
|
|
|
- if (host != n) {
|
|
|
- piccount++;
|
|
|
- if (i == $(img).length - 1)
|
|
|
- sstr += that.attr("src");
|
|
|
- else
|
|
|
- sstr += that.attr("src") + ",";
|
|
|
+ if (yhost) {
|
|
|
+ if (host != n && yhost != n) {
|
|
|
+ piccount++;
|
|
|
+ if (i == $(img).length - 1)
|
|
|
+ sstr += that.attr("src");
|
|
|
+ else
|
|
|
+ sstr += that.attr("src") + ",";
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (host != n) {
|
|
|
+ piccount++;
|
|
|
+ if (i == $(img).length - 1)
|
|
|
+ sstr += that.attr("src");
|
|
|
+ else
|
|
|
+ sstr += that.attr("src") + ",";
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
});
|
|
|
|