Rclone unable to download google editor files of large sized due to error response code of 413. So, can we have a feature which could download such files as pdf file, after attempting to download in default formats like (.docx, .pptx)?

Also, it would be a quick job for you to add this feature that would be something like

if mimeType == "application/vnd.google-apps.presentation" {
    if resp.StatusCode == 413 {
        ext = "pdf"
    } else {
        ext = "pptx"
    }
} else if mimeType == "application/vnd.google-apps.document" {
       if resp.StatusCode == 413 {
        ext = "pdf"
    } else {
        ext = "docx"
    }
} else if mimeType == "application/vnd.google-apps.spreadsheet" {
        if resp.StatusCode == 413 {
        ext = "pdf"
    } else {
        ext = "xlsx"
    }
} else {
    ext = strings.ToLower(info.NameExt)
}

Can this be considered as a request to have this feature wherein if a Google editor file is not able to download due to the 413 response code then, it is being downloaded as a pdf file? The flag then can be updated to like --drive-export-formats docx, pptx, xlsx, SVG, pdf , so that if a google presentation fails to download as pptx due to 413 response code then, it can be downloaded as pdf. Similarly, if a google document fails to download as docx due to 413 response code then, it can be downloaded as pdf.
Or else, could you quickly guide me to the file where I can make such edits in my forked repo?

I replied on the original thread about this, but in summary rclone needs to know the file extension before copying the file so this can't work :frowning:

Hi Kartik,

I haven't tried but you could probably get a better understanding of Nick by placing a breakpoint here

and then take a look at the call stack when the 413 is received :slight_smile:

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.