Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

před 7 roky
před 9 roky
před 9 roky
před 9 roky
před 7 roky
před 9 roky
před 9 roky
před 7 roky
před 9 roky
před 7 roky
před 9 roky
před 7 roky
před 7 roky
před 7 roky
před 7 roky
před 7 roky
před 7 roky
před 7 roky
před 9 roky
před 7 roky
před 9 roky
před 7 roky
před 7 roky
před 9 roky
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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/github.com/dutchcoders/transfer.sh)](https://goreportcard.com/report/github.com/dutchcoders/transfer.sh) [![Docker pulls](https://img.shields.io/docker/pulls/dutchcoders/transfer.sh.svg)](https://hub.docker.com/r/dutchcoders/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) and gdrive (Google Drive) providers 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. ```
  15. ## Add alias to .bashrc or .zshrc
  16. ```
  17. transfer() {
  18. # write to output to tmpfile because of progress bar
  19. tmpfile=$( mktemp -t transferXXX )
  20. curl --progress-bar --upload-file $1 https://transfer.sh/$(basename $1) >> $tmpfile;
  21. cat $tmpfile;
  22. rm -f $tmpfile;
  23. }
  24. alias transfer=transfer
  25. ```
  26. Now run it like this
  27. ```
  28. $ transfer test.txt
  29. ```
  30. ### On Windows
  31. Put a file called transfer.cmd somewhere in your PATH with this inside it:
  32. ```
  33. @echo off
  34. setlocal
  35. :: use env vars to pass names to PS, to avoid escaping issues
  36. set FN=%~nx1
  37. set FULL=%1
  38. powershell -noprofile -command "$(Invoke-Webrequest -Method put -Infile $Env:FULL https://transfer.sh/$Env:FN).Content"
  39. ```
  40. ## Usage
  41. Parameter | Description | Value | Env
  42. --- | --- | --- | ---
  43. listener | port to use for http (:80) | |
  44. profile-listener | port to use for profiler (:6060)| |
  45. force-https | redirect to https | false |
  46. tls-listener | port to use for https (:443) | |
  47. tls-cert-file | path to tls certificate | |
  48. tls-private-key | path to tls private key | |
  49. http-auth-user | user for basic http auth on upload | |
  50. http-auth-pass | pass for basic http auth on upload | |
  51. temp-path | path to temp folder | system temp |
  52. web-path | path to static web files (for development) | |
  53. provider | which storage provider to use | (s3, grdrive or local) |
  54. aws-access-key | aws access key | | AWS_ACCESS_KEY
  55. aws-secret-key | aws access key | | AWS_SECRET_KEY
  56. bucket | aws bucket | | BUCKET
  57. basedir | path storage for local/gdrive provider| |
  58. gdrive-client-json-filepath | path to client json config for gdrive provider| |
  59. gdrive-local-config-path | path to local transfer.sh config cache for gdrive provider| |
  60. lets-encrypt-hosts | hosts to use for lets encrypt certificates (comma seperated) | |
  61. log | path to log file| |
  62. If you want to use TLS using lets encrypt certificates, set lets-encrypt-hosts to your domain, set tls-listener to :443 and enable force-https.
  63. If you want to use TLS using your own certificates, set tls-listener to :443, force-https, tls-cert=file and tls-private-key.
  64. ## Development
  65. Make sure your GOPATH is set correctly.
  66. ```
  67. go run main.go -provider=local --listener :8080 --temp-path=/tmp/ --basedir=/tmp/
  68. ```
  69. ## Build
  70. ```
  71. go build -o transfersh main.go
  72. ```
  73. ## Docker
  74. For easy deployment we've created a Docker container.
  75. ```
  76. docker run --publish 8080:8080 dutchcoders/transfer.sh:latest --provider local --basedir /tmp/
  77. ```
  78. ## Contributions
  79. Contributions are welcome.
  80. ## Creators
  81. **Remco Verhoef**
  82. - <https://twitter.com/remco_verhoef>
  83. - <https://twitter.com/dutchcoders>
  84. **Uvis Grinfelds**
  85. ## Copyright and license
  86. Code and documentation copyright 2011-2014 Remco Verhoef.
  87. Code released under [the MIT license](LICENSE).