Comparing version 1.0.3 to 1.1.0
@@ -7,3 +7,3 @@ /** | ||
*/ | ||
module.exports = function(config, filename) { | ||
module.exports = function(config, filename, cliOptions) { | ||
@@ -49,4 +49,8 @@ // requires | ||
if (data && data.url) { | ||
console.log(data.url); | ||
saveToPasteboard(data.url); | ||
var outURL = data.url; | ||
if (cliOptions.download) { | ||
outURL = getDownloadLink(data.url, data.link_shareid); | ||
} | ||
console.log(outURL); | ||
saveToPasteboard(outURL); | ||
} | ||
@@ -71,2 +75,8 @@ }); | ||
var getDownloadLink = function(publicURL, shareID) { | ||
var cldURL = 'https://cld.pt/dl/download/', | ||
filePart = publicURL.split('/').pop(); | ||
return cldURL + shareID + '/' + filePart; | ||
}; | ||
var getPrettyFileSize = function(size) { | ||
@@ -73,0 +83,0 @@ var sizeUnit = 'kB'; |
@@ -9,3 +9,3 @@ { | ||
], | ||
"version": "1.0.3", | ||
"version": "1.1.0", | ||
"repository": { | ||
@@ -12,0 +12,0 @@ "type": "git", |
@@ -21,6 +21,9 @@ # Cloudify - Share your files from the command line | ||
cloudify <path_to_file> | ||
cloudify [options] <path_to_file> | ||
options: | ||
-d get the final link to the file instead of the CloudPT preview link | ||
After running this command, you'll get the public link to the file that you can share throught IM or IRC or whatever! If you're on OSX, you will also get the public link automatically copied into your clipboard. How cool is that? | ||
[0]: http://cloudpt.pt |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10309
171
29