You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 2.5 KiB

9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. # transfer.sh [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/dutchcoders/transfer.sh?utm_source=badge&utm_medium=badge&utm_campaign=&utm_campaign=pr-badge&utm_content=badge) [![Go Report Card](https://goreportcard.com/badge/dutchcoders/transfer.sh)](https://goreportcard.com/report/dutchcoders/transfer.sh) [![Docker pulls](https://img.shields.io/docker/pulls/transfer.sh/transfer.sh.svg)](https://hub.docker.com/r/transfer.sh/transfer.sh/) [![Build Status](https://travis-ci.org/dutchcoders/transfer.sh.svg?branch=master)](https://travis-ci.org/dutchcoders/transfer.sh)
  2. Easy and fast file sharing from the command-line. This code contains the server with everything you need to create your own instance.
  3. Transfer.sh support currently the s3 (Amazon S3) provider and local file system (local).
  4. ## Usage
  5. ```
  6. Upload:
  7. $ curl --upload-file ./hello.txt https://transfer.sh/hello.txt
  8. Encrypt & upload:
  9. $ cat /tmp/hello.txt|gpg -ac -o-|curl -X PUT --upload-file "-" https://transfer.sh/test.txt
  10. Download & decrypt:
  11. $ curl https://transfer.sh/1lDau/test.txt|gpg -o- > /tmp/hello.txt
  12. Upload to virustotal:
  13. $ curl -X PUT --upload-file nhgbhhj https://transfer.sh/test.txt/virustotal
  14. Add alias to .bashrc or .zshrc:
  15. ===
  16. transfer() {
  17. # write to output to tmpfile because of progress bar
  18. tmpfile=$( mktemp -t transferXXX )
  19. curl --progress-bar --upload-file $1 https://transfer.sh/$(basename $1) >> $tmpfile;
  20. cat $tmpfile;
  21. rm -f $tmpfile;
  22. }
  23. alias transfer=transfer
  24. ===
  25. $ transfer test.txt
  26. ```
  27. ## Development
  28. ```
  29. npm install
  30. bower install
  31. go get github.com/PuerkitoBio/ghost/handlers
  32. go get github.com/gorilla/mux
  33. go get github.com/dutchcoders/go-clamd
  34. go get github.com/goamz/goamz/s3
  35. go get github.com/goamz/goamz/aws
  36. go get github.com/golang/gddo/httputil/header
  37. go get github.com/kennygrant/sanitize
  38. grunt serve
  39. grunt build
  40. go run transfersh-server/*.go -provider=local --port 8080 --temp=/tmp/ --basedir=/tmp/
  41. ```
  42. ## Build
  43. ```
  44. go build -o transfersh-server *.go
  45. ```
  46. ## Docker
  47. For easy deployment we've enabled Docker deployment.
  48. ```
  49. docker build -t transfersh .
  50. docker run --publish 8080:8080 --rm transfersh --provider local --basedir /tmp/
  51. ```
  52. ## Contributions
  53. Contributions are welcome.
  54. ## Creators
  55. **Remco Verhoef**
  56. - <https://twitter.com/remco_verhoef>
  57. - <https://twitter.com/dutchcoders>
  58. **Uvis Grinfelds**
  59. ## Copyright and license
  60. Code and documentation copyright 2011-2014 Remco Verhoef.
  61. Code released under [the MIT license](LICENSE).