Added new link type: EXTRA_FILE, to allow sendign links with sources included so as to trigger direct transfer.

This makes possible to send files through chat without permitting tunnel access to the files. The client requests
the file as a direct transfer only, using the supplied source.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5799 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2012-11-10 22:59:51 +00:00
parent a573211629
commit 929f872544
4 changed files with 111 additions and 4 deletions

View file

@ -629,7 +629,7 @@ void ChatWidget::fileHashingFinished(QList<HashedFile> hashedFiles)
QString ext = QFileInfo(hashedFile.filename).suffix();
RetroShareLink link;
link.createFile(hashedFile.filename, hashedFile.size, QString::fromStdString(hashedFile.hash));
link.createExtraFile(hashedFile.filename, hashedFile.size, QString::fromStdString(hashedFile.hash),QString::fromStdString(rsPeers->getOwnId()));
if (hashedFile.flag & HashedFile::Picture) {
message += QString("<img src=\"file:///%1\" width=\"100\" height=\"100\">").arg(hashedFile.filepath);