@ -1150,6 +1150,7 @@ define([
APP.realtime.onSettle(function () {
APP.getImageURL(name, function(url) {
debug("CRYPTPAD success add " + name);
common.setPadAttribute('atime', +new Date(), null, data.href);
APP.AddImageSuccessCallback({
name: name,
url: url
@ -538,6 +538,7 @@ define([
}
if (!mediaTagEmbedder) { console.log('mediaTagEmbedder missing'); return; }
if (data.type !== 'file') { console.log('unhandled embed type ' + data.type); return; }
var privateDat = cpNfInner.metadataMgr.getPrivateData();
var origin = privateDat.fileHost || privateDat.origin;
var src = data.src = data.src.slice(0,1) === '/' ? origin + data.src : data.src;
@ -1205,6 +1205,7 @@ define([
};
common.openFilePicker(pickerCfg, function (data) {
if (data.type === 'file' && APP.editor) {
var mt = '<media-tag src="' + data.src + '" data-crypto-key="cryptpad:' + data.key + '"></media-tag>';
APP.editor.replaceSelection(mt);
return;
@ -114,6 +114,7 @@ define([
var key = Hash.encodeBase64(secret.keys.cryptKey);
sframeChan.event("EV_SECURE_ACTION", {
type: parsed.type,
href: data.url,
src: src,
name: data.name,
key: key
@ -144,15 +144,6 @@ define([
config.onFileUpload(sframeChan, data, cb);
});
sframeChan.on('Q_GET_FILES_LIST', function (types, cb) {
Cryptpad.getSecureFilesList(types, function (err, data) {
cb({
error: err,
data: data
sframeChan.on('EV_SECURE_IFRAME_CLOSE', function () {
config.onClose();