Mikubill / cowtransfer-uploader

Simple Cowtransfer Uploader/Downloader in Golang
MIT License
436 stars 58 forks source link

无法上传文件 #56

Open Faultiness opened 2 years ago

Faultiness commented 2 years ago

版本: v0.4.21 环境: Ubuntu 18.04 LTS

使用命令./cowtransfer-uploader --verbose text.txt上传文件报错,日志如下:

2022/02/01 23:59:53 config = &{token: parallel:3 interval:15 prefix:. debugMode:true singleMode:false version:false keepMode:false authCode: blockSize:1200000 hashCheck:false passCode: silentMode:false validDays:1}
2022/02/01 23:59:53 files = [text.txt]
2022/02/01 23:59:53 retrying: 0
2022/02/01 23:59:53 postBody: map[totalSize:9 validDays:1]
2022/02/01 23:59:53 endpoint: https://cowtransfer.com/api/transfer/preparesend
2022/02/01 23:59:53 map[Authorization:[] Content-Type:[multipart/form-data;boundary=1e3555ae2be6aecaa5f6cdec6c87c585c966962a2721a73496e6303dc538] Cookie:[] Referer:[https://cowtransfer.com/]]
2022/02/01 23:59:54 returns: {"timestamp":1643731194507,"status":415,"error":"Unsupported Media Type","exception":"org.springframework.web.HttpMediaTypeNotSupportedException","message":"Content type 'multipart/form-data;boundary=1e3555ae2be6aecaa5f6cdec6c87c585c966962a2721a73496e6303dc538;charset=UTF-8' not supported","path":"/transfer/preparesend"}
getSendConfig returns error: json: cannot unmarshal string into Go struct field prepareSendResp.error of type bool, onfile: text.txt
joeychsu commented 2 years ago

I have the same issue. Did anyone can help? Thanks.