mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 17:54:48 -04:00
Send images with their imageInfo (size, mymetype, width & height)
This commit is contained in:
parent
da2f5aac0e
commit
6d3391f2f0
5 changed files with 89 additions and 17 deletions
|
@ -27,10 +27,10 @@ angular.module('mFileUpload', [])
|
|||
* Upload an HTML5 file to a server and returned a promise
|
||||
* that will provide the URL of the uploaded file.
|
||||
*/
|
||||
this.uploadFile = function(file) {
|
||||
this.uploadFile = function(file, body) {
|
||||
var deferred = $q.defer();
|
||||
console.log("Uploading " + file.name + "... to /matrix/content");
|
||||
matrixService.uploadContent(file).then(
|
||||
matrixService.uploadContent(file, body).then(
|
||||
function(response) {
|
||||
var content_url = location.origin + "/matrix/content/" + response.data.content_token;
|
||||
console.log(" -> Successfully uploaded! Available at " + content_url);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue