mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 16:34:30 +01:00
copyurl: add troubleshooting section to the docs
See: https://forum.rclone.org/t/copyurl-fails-with-stream-error-wget-and-curl-works/44382/2
This commit is contained in:
parent
15890b7ce7
commit
4a049c12fe
@ -6,6 +6,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/rclone/rclone/cmd"
|
"github.com/rclone/rclone/cmd"
|
||||||
"github.com/rclone/rclone/fs"
|
"github.com/rclone/rclone/fs"
|
||||||
@ -34,23 +35,37 @@ func init() {
|
|||||||
|
|
||||||
var commandDefinition = &cobra.Command{
|
var commandDefinition = &cobra.Command{
|
||||||
Use: "copyurl https://example.com dest:path",
|
Use: "copyurl https://example.com dest:path",
|
||||||
Short: `Copy url content to dest.`,
|
Short: `Copy the contents of the URL supplied content to dest:path.`,
|
||||||
Long: `
|
Long: strings.ReplaceAll(`
|
||||||
Download a URL's content and copy it to the destination without saving
|
Download a URL's content and copy it to the destination without saving
|
||||||
it in temporary storage.
|
it in temporary storage.
|
||||||
|
|
||||||
Setting ` + "`--auto-filename`" + ` will attempt to automatically determine the filename from the URL
|
Setting |--auto-filename| will attempt to automatically determine the
|
||||||
(after any redirections) and used in the destination path.
|
filename from the URL (after any redirections) and used in the
|
||||||
With ` + "`--auto-filename-header`" + ` in
|
destination path.
|
||||||
addition, if a specific filename is set in HTTP headers, it will be used instead of the name from the URL.
|
|
||||||
With ` + "`--print-filename`" + ` in addition, the resulting file name will be printed.
|
|
||||||
|
|
||||||
Setting ` + "`--no-clobber`" + ` will prevent overwriting file on the
|
With |--auto-filename-header| in addition, if a specific filename is
|
||||||
|
set in HTTP headers, it will be used instead of the name from the URL.
|
||||||
|
With |--print-filename| in addition, the resulting file name will be
|
||||||
|
printed.
|
||||||
|
|
||||||
|
Setting |--no-clobber| will prevent overwriting file on the
|
||||||
destination if there is one with the same name.
|
destination if there is one with the same name.
|
||||||
|
|
||||||
Setting ` + "`--stdout`" + ` or making the output file name ` + "`-`" + `
|
Setting |--stdout| or making the output file name |-|
|
||||||
will cause the output to be written to standard output.
|
will cause the output to be written to standard output.
|
||||||
`,
|
|
||||||
|
### Troublshooting
|
||||||
|
|
||||||
|
If you can't get |rclone copyurl| to work then here are some things you can try:
|
||||||
|
|
||||||
|
- |--disable-http2| rclone will use HTTP2 if available - try disabling it
|
||||||
|
- |--bind 0.0.0.0| rclone will use IPv6 if available - try disabling it
|
||||||
|
- |--bind ::0| to disable IPv4
|
||||||
|
- |--user agent curl| - some sites have whitelists for curl's user-agent - try that
|
||||||
|
- Make sure the site works with |curl| directly
|
||||||
|
|
||||||
|
`, "|", "`"),
|
||||||
Annotations: map[string]string{
|
Annotations: map[string]string{
|
||||||
"versionIntroduced": "v1.43",
|
"versionIntroduced": "v1.43",
|
||||||
"groups": "Important",
|
"groups": "Important",
|
||||||
|
Loading…
Reference in New Issue
Block a user