wetransfer.com.sh 1003 B

123456789101112131415161718192021222324252627282930
  1. #!/bin/sh
  2. #=========================================================================================================================
  3. # WeTransfer is a service to send big or small files from A to B.
  4. # It can transfer any type of file - such as presentations, photos, videos, music or documents - to friends and colleagues.
  5. # You can send files up to 2 GB and they will be available for 7 days, with no registration.
  6. # API doc: https://developers.wetransfer.com/documentation
  7. # Using transferwee.py: https://github.com/iamleot/transferwee
  8. #=========================================================================================================================
  9. if [ $# -eq 0 ]; then
  10. echo "Usage: python3 transferwee.py FILE\n"
  11. exit 1
  12. fi
  13. FILE=$1
  14. if [ ! -f "$FILE" ]; then
  15. echo "File ${FILE} not found"
  16. exit 1
  17. fi
  18. scripts_path=`dirname $0`
  19. python3 -m pip install -U -q requests
  20. RESPONSE=$(python3 ${scripts_path}/transferwee.py upload "${FILE}")
  21. echo "${RESPONSE}" # to terminal