[Pkg-owncloud-commits] [owncloud] 12/122: Use webDAV to have access to HTTP byte ranges

David Prévot taffit at moszumanska.debian.org
Sat May 9 00:00:01 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch stable8
in repository owncloud.

commit 530c290555cb326e6a6bda867e16931ff4ae7df5
Author: Olivier Paroz <github at oparoz.com>
Date:   Thu Apr 16 19:46:26 2015 +0200

    Use webDAV to have access to HTTP byte ranges
---
 apps/files_sharing/js/public.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js
index cfb6569..f80d5e1 100644
--- a/apps/files_sharing/js/public.js
+++ b/apps/files_sharing/js/public.js
@@ -111,8 +111,11 @@ OCA.Sharing.PublicApp = {
 			img.attr('src', $('#downloadURL').val());
 			img.appendTo('#imgframe');
 		} else if (mimetype.substr(0, mimetype.indexOf('/')) === 'text') {
+			// Undocumented Url to public WebDAV endpoint
+			var url = parent.location.protocol + '//' +
+				token + '@' + location.host + OC.linkTo('', 'public.php/webdav');
 			$.ajax({
-				url: $('#downloadURL').val(),
+				url: url,
 				headers: {Range: "bytes=0-1000"}
 			}).then(function (data) {
 				var textDiv = $('<span/>').addClass('text-preview');

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list