Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Bug in mimeType handling in get_file_contents #1168

Closed
Assignees
kerobbi
@bluestonepim-frb

Description

@bluestonepim-frb

This line of code makes the get_file_contents tool produce corrupted output for most binary formats like pdf (application/pdf), .docx (application/vnd.openxmlformats-officedocument.wordprocessingml.document) etc. since the data is not returned as byte64 encoded string:

ifstrings.HasPrefix(contentType,"application")||strings.HasPrefix(contentType,"text") {

Here the corruption occurs:

Solution is to byte64 encode all binary formats, just like in this line:

Blob:base64.StdEncoding.EncodeToString(body),

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp