Skip to content

Commit e35dd7a

Browse files
author
Charles-Antoine Mathieu
authored
Merge pull request src-d#221 from camathieu/1.2.1
1.2.1
2 parents 2ceb5f3 + b25099b commit e35dd7a

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

server/public/js/app.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,13 @@ plik.controller('MainCtrl', ['$scope', '$api', '$config', '$route', '$location',
778778
// Build file download URL
779779
var getFileUrl = function(mode, uploadID, fileID, fileName, yubikeyToken, dl) {
780780
var domain = $scope.config.downloadDomain ? $scope.config.downloadDomain : $api.base;
781-
var url = domain + '/' + mode + '/' + uploadID + '/' + fileID + '/' + fileName;
781+
var url = domain + '/' + mode + '/' + uploadID;
782+
if (fileID) {
783+
url += '/' + fileID
784+
}
785+
if (fileName) {
786+
url+= '/' + fileName
787+
}
782788
if (yubikeyToken) {
783789
url += "/yubikey/" + yubikeyToken
784790
}
@@ -800,7 +806,7 @@ plik.controller('MainCtrl', ['$scope', '$api', '$config', '$route', '$location',
800806
// Return zip archive download URL
801807
$scope.getZipArchiveUrl = function (dl) {
802808
if (!$scope.upload.id) return;
803-
return getFileUrl("archive", $scope.upload.id, file.metadata.id, "archive.zip", null, dl);
809+
return getFileUrl("archive", $scope.upload.id, null, "archive.zip", null, dl);
804810
};
805811

806812
// Return QR Code image url

server/public/partials/main.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<i data-swoff-text="OFF" data-swon-text="ON"></i>
3636
Destruct after the first download
3737
<a tooltip-placement="right"
38-
tooltip="The files will be removed from the server right after the first download.">?</a>
38+
uib-tooltip="The files will be removed from the server right after the first download.">?</a>
3939
</label>
4040
</div>
4141
<!-- STREAMING -->
@@ -44,7 +44,7 @@
4444
<input name="checkbox-destruct" type="checkbox" ng-model="upload.stream">
4545
<i data-swoff-text="OFF" data-swon-text="ON"></i> Streaming
4646
<a tooltip-placement="right"
47-
tooltip="The files will not be stored on the server. Upload will begin when the remote user starts downloading.">?</a>
47+
uib-tooltip="The files will not be stored on the server. Upload will begin when the remote user starts downloading.">?</a>
4848
</label>
4949
</div>
5050
<!-- REMOVABLE -->
@@ -53,7 +53,7 @@
5353
<input name="checkbox-removable" type="checkbox" ng-model="upload.removable">
5454
<i data-swoff-text="OFF" data-swon-text="ON"></i> Removable
5555
<a tooltip-placement="right"
56-
tooltip="Allow to manually remove the uploaded files from the server at any moment.">?</a>
56+
uib-tooltip="Allow to manually remove the uploaded files from the server at any moment.">?</a>
5757
</label>
5858
</div>
5959
<!-- PASSWORD -->
@@ -63,7 +63,7 @@
6363
ng-change="upload.password = ''">
6464
<i data-swoff-text="OFF" data-swon-text="ON"></i> Password
6565
<a tooltip-placement="right"
66-
tooltip="Protect your upload with credentials. You will be prompted for them before the upload and before the download.">?</a>
66+
uib-tooltip="Protect your upload with credentials. You will be prompted for them before the upload and before the download.">?</a>
6767
</label>
6868
</div>
6969
<!-- YUBIKEY -->
@@ -73,7 +73,7 @@
7373
ng-change="upload.yubikey = ''">
7474
<i data-swoff-text="OFF" data-swon-text="ON"></i> Yubikey
7575
<a tooltip-placement="right"
76-
tooltip="Protect you upload with a Yubikey. You will be prompted for OTP before the upload and before the download.">?</a>
76+
uib-tooltip="Protect you upload with a Yubikey. You will be prompted for OTP before the upload and before the download.">?</a>
7777
</label>
7878
</div>
7979
<!-- COMMENTS -->
@@ -83,7 +83,7 @@
8383
<i data-swoff-text="OFF" data-swon-text="ON"></i> Comments (<a
8484
href="http://daringfireball.net/projects/markdown/syntax" target="_blank">Markdown</a>)
8585
<a tooltip-placement="right"
86-
tooltip="Add some comments to the upload. Markdown language supported and live preview.">?</a>
86+
uib-tooltip="Add some comments to the upload. Markdown language supported and live preview.">?</a>
8787
</label>
8888
</div>
8989
<div class="menu-item">
@@ -119,7 +119,7 @@
119119

120120
<div class="" style="text-align:center;">
121121
<a href="" class="small" ng-click="newUpload(true);"
122-
tooltip-placement="bottom" tooltip="Allow to add files to an upload afterward it's creation.">
122+
tooltip-placement="bottom" uib-tooltip="Allow to add files to an upload afterward it's creation.">
123123
Create empty upload
124124
</a>
125125
</div>
@@ -137,7 +137,7 @@
137137
</div>
138138
<div class="menu-item text-center" ng-if="upload.uploadToken">
139139
<a href="" class="small" ng-click="setAdminUrl()"
140-
tooltip-placement="bottom" tooltip="Allow to add/remove files to an upload afterward it's creation.">
140+
tooltip-placement="bottom" uib-tooltip="Allow to add/remove files to an upload afterward it's creation.">
141141
Admin url
142142
</a>
143143
</div>

0 commit comments

Comments
 (0)