User:Docmoates/Social: Difference between revisions

From XMethod Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 345: Line 345:
xhr.onload=function(){
xhr.onload=function(){
if(xhr.status===200){
if(xhr.status===200){
try{
var resp=JSON.parse(xhr.responseText);
var resp=JSON.parse(xhr.responseText);
if(resp.upload){
if(resp.upload){
Line 352: Line 353:
}else if(resp.error){onError(resp.error.info);}
}else if(resp.error){onError(resp.error.info);}
else{onError('Unknown error');}
else{onError('Unknown error');}
}else{onError('Upload failed');}
}catch(e){onError('Parse error');}
}else{onError('Upload failed: '+xhr.status);}
};
};
xhr.onerror=function(){onError('Upload failed');};
xhr.onerror=function(){onError('Network error');};
xhr.ontimeout=function(){onError('Timeout');};
xhr.timeout=60000;
xhr.send(formData);
xhr.send(formData);
});
}).catch(function(e){onError('Token error: '+e);});
}
}



Revision as of 03:12, 3 February 2026

Add Story
?
Edit
📍
📝
No posts yet
Be the first to share something!
Set Profile Photo
Upload
From URL
📸
Click to select or drag photo here

Uploading...

Add Story
Upload
From URL
📷
Click to select or drag image here

Uploading...

Add Photo
Upload
From URL
📤
Click to select or drag image here

Uploading...

Add Video
Upload
From URL
🎬
Click to select or drag video here

Uploading...

Supports YouTube, Vimeo, or direct video URLs

Add Location

— or —