Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/client/settings.js b/client/settings.js
- index 90c0a4c..f2ec581 100644
- --- a/client/settings.js
- +++ b/client/settings.js
- @@ -8,7 +8,8 @@ Meteor.settings.public = {
- "http://127.0.0.1:8080"
- ],
- "snapMaxFileSizeKB": 1024,
- - "upldr": ["upldr1", "upldr3", "upldr5", "upldrg1", "upldrg5", "cluster"]
- + "upldr": ["upldr1", "upldr3", "upldr5", "upldrg1", "upldrg5", "cluster"],
- + "localhost": false
- },
- "app": "dtube/0.7",
- "beneficiary": "dtube",
- @@ -46,4 +47,4 @@ Meteor.settings.public = {
- // Meteor.settings.public = json
- // Session.set('remoteSettings', Meteor.settings.public.remote)
- // }
- -// })
- \ No newline at end of file
- +// })
- diff --git a/client/views/pages/upload/upload.js b/client/views/pages/upload/upload.js
- index 039856d..0750fdf 100644
- --- a/client/views/pages/upload/upload.js
- +++ b/client/views/pages/upload/upload.js
- @@ -79,7 +79,9 @@ Template.upload.setBestUploadEndpoint = function (cb) {
- }
- var getUploaderStatus = function (upldr) {
- - var url = 'https://'+upldr+'.d.tube/getStatus'
- + var url = (Session.get('remoteSettings').localhost == true)
- + ? 'https://localhost:5000/getStatus'
- + : 'https://'+upldr+'.d.tube/getStatus'
- return new Promise(function (resolve, reject) {
- var req = new XMLHttpRequest();
- req.open('get', url, true);
- @@ -110,7 +112,9 @@ Template.upload.genBody = function (author, permlink, title, snaphash, videohash
- }
- Template.upload.uploadVideo = function (file, progressid, cb) {
- - var postUrl = 'https://'+Session.get('upldr')+'.d.tube/uploadVideo?videoEncodingFormats=240p,480p,720p&sprite=true'
- + var postUrl = (Session.get('remoteSettings').localhost == true)
- + ? 'http://localhost:5000/uploadVideo?videoEncodingFormats=240p,480p,720p&sprite=true'
- + : 'https://'+Session.get('upldr')+'.d.tube/uploadVideo?videoEncodingFormats=240p,480p,720p&sprite=true'
- var formData = new FormData();
- formData.append('files', file);
- $(progressid).progress({ value: 0, total: 1 })
- @@ -163,7 +167,9 @@ Template.upload.uploadImage = function (file, progressid, cb) {
- $('#uploadSnap > i').removeClass('cloud upload red')
- $('#uploadSnap > i').addClass('asterisk loading')
- $('#uploadSnap > i').css('background', 'transparent')
- - var postUrl = 'https://snap1.d.tube/uploadImage'
- + var postUrl = (Session.get('remoteSettings').localhost == true)
- + ? 'https://localhost:5000/uploadImage'
- + : 'https://snap1.d.tube/uploadImage'
- var formData = new FormData();
- formData.append('files', file);
- $(progressid).progress({ value: 0, total: 1 })
- diff --git a/client/views/pages/upload/uploadvideoprogress/uploadvideoprogress.js b/client/views/pages/upload/uploadvideoprogress/uploadvideoprogress.js
- index c5627bf..2d23d58 100644
- --- a/client/views/pages/upload/uploadvideoprogress/uploadvideoprogress.js
- +++ b/client/views/pages/upload/uploadvideoprogress/uploadvideoprogress.js
- @@ -9,7 +9,9 @@ Template.uploadvideoprogress.rendered = function() {
- }
- Template.uploadvideoprogress.update = function() {
- var token = Session.get('uploadToken')
- - var url = 'https://'+Session.get('upldr')+'.d.tube/getProgressByToken/'+token
- + var url = (Session.get('remoteSettings').localhost == true)
- + ? 'https://localhost:5000/getProgressByToken/'+token
- + : 'https://'+Session.get('upldr')+'.d.tube/getProgressByToken/'+token
- var credentials = Session.get('upldr') == 'cluster' ? true : false
- $.ajax({
- cache: false,
- @@ -86,4 +88,4 @@ Template.uploadvideoprogress.update = function() {
- // }
- // })
- -}
- \ No newline at end of file
- +}
- diff --git a/public/DTube_files/settings.json b/public/DTube_files/settings.json
- index eb6b9c3..6115561 100644
- --- a/public/DTube_files/settings.json
- +++ b/public/DTube_files/settings.json
- @@ -9,7 +9,8 @@
- // "http://127.0.0.1:8080"
- ],
- "snapMaxFileSizeKB": 1024,
- - "upldr": ["upldr1", "upldr3", "upldr5", "upldrg1", "upldrg5", "cluster"]
- + "upldr": ["upldr1", "upldr3", "upldr5", "upldrg1", "upldrg5", "cluster"],
- + "localhost": false
- },
- "app": "dtube/0.7",
- "beneficiary": "dtube",
- @@ -39,4 +40,4 @@
- "tr": {"name": "Türkçe", "path": "tr/tr-TR.json"}
- }
- }
- -
- \ No newline at end of file
- +
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement