dify icon indicating copy to clipboard operation
dify copied to clipboard

File validation failed for file

Open SugarFatFree opened this issue 2 weeks ago • 16 comments

Self Checks

  • [x] I have read the Contributing Guide and Language Policy.
  • [x] This is only for bug report, if you would like to ask a question, please head to Discussions.
  • [x] I have searched for existing issues search for existing issues, including closed ones.
  • [x] I confirm that I am using English to submit this report, otherwise it will be closed.
  • [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • [x] Please do not modify this template :) and fill in all the required fields.

Dify version

1.11.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Request : http://172.29.246.34/v1/workflows/run

{
  "inputs": {
    "docFile": {
      "transfer_method": "remote_url",
      "url": "http://172.29.226.66:8080/doc-element-ext/7c/7cceb74ed3c9a5d6/7cceb74ed3c9a5d6.pdf?AWSAccessKeyId=mqeadfin&Signature=Z9UcmibdGrqa406Vht0G4b%3D&Expires=1766569903",
      "type": "document"
    },
    "content": "#项目名称#"
  },
  "response_mode": "streaming",
  "user": "test"
}

✔️ Expected Behavior

Return success

❌ Actual Behavior

{ "code": "invalid_param", "message": "File validation failed for file: 7cceb74ed3c9a5d6.pdf", "status": 400 }

SugarFatFree avatar Dec 24 '25 09:12 SugarFatFree

The "File validation failed" error for remote_url uploads in Dify is usually caused by one of these issues:

  1. The type field in your input should be set to "custom" (not "document") when using remote_url. Using "document" will trigger a validation error like the one you saw. Try changing "type": "custom" in your request and see if it succeeds [source].

  2. For remote files, the API expects you to first call the (undocumented) /api/remote-files/upload endpoint with your file URL. This endpoint downloads and validates the file, then returns an upload_file_id. You should use this upload_file_id in your workflow request instead of passing the raw URL. The web UI does this automatically, but API users must do it manually [source].

  3. Make sure the remote URL is accessible from inside your Docker container. Try running curl or wget from within the container to verify the file can be downloaded [source].

  4. Dify enforces stricter validation on file extension and mime_type. If the file is missing an extension or has an unexpected type, validation will fail. Also, check that the file size does not exceed any configured limits [source].

Try these steps:

  • Change "type": "document" to "type": "custom" in your input.
  • Call /api/remote-files/upload with your file URL, then use the returned upload_file_id in your workflow request.
  • Test the file URL from inside your Docker container.
  • Check backend logs for more detailed error messages if the issue persists.

Let me know if you need help with the exact API calls or troubleshooting any of these steps.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

dosubot[bot] avatar Dec 24 '25 09:12 dosubot[bot]

The "File validation failed" error for remote_url uploads in Dify is usually caused by one of these issues:

  1. The type field in your input should be set to "custom" (not "document") when using remote_url. Using "document" will trigger a validation error like the one you saw. Try changing "type": "custom" in your request and see if it succeeds [source].
  2. For remote files, the API expects you to first call the (undocumented) /api/remote-files/upload endpoint with your file URL. This endpoint downloads and validates the file, then returns an upload_file_id. You should use this upload_file_id in your workflow request instead of passing the raw URL. The web UI does this automatically, but API users must do it manually [source].
  3. Make sure the remote URL is accessible from inside your Docker container. Try running curl or wget from within the container to verify the file can be downloaded [source].
  4. Dify enforces stricter validation on file extension and mime_type. If the file is missing an extension or has an unexpected type, validation will fail. Also, check that the file size does not exceed any configured limits [source].

Try these steps:

  • Change "type": "document" to "type": "custom" in your input.
  • Call /api/remote-files/upload with your file URL, then use the returned upload_file_id in your workflow request.
  • Test the file URL from inside your Docker container.
  • Check backend logs for more detailed error messages if the issue persists.

Let me know if you need help with the exact API calls or troubleshooting any of these steps.

To reply, just mention @dosu.

How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

Could not find interface documentation for interface "/api/remote-files/upload" and do not know where to get app tokens required for this interface.

SugarFatFree avatar Dec 24 '25 09:12 SugarFatFree

There is no official documentation for the /api/remote-files/upload endpoint, but it is required for remote file uploads via API. To use it, send a POST request with a JSON body like {"url": "https://your-remote-file-url"} and include an Authorization header with a Bearer app token (e.g., Authorization: Bearer app-xxxx). The endpoint will download and validate the file, then return an upload_file_id, which you should use in your workflow or chat-messages API call instead of the raw URL. The web UI handles this automatically, but API users must do it manually.

App tokens are the same as those used for other Dify API endpoints—typically generated in the Dify web UI under your app's settings or API keys section. If you can't find where to generate an app token, check your Dify admin panel or deployment documentation for "API Key" or "App Token" management.

For more details and example API calls, see this discussion: Dify Discussion #28998 and Issue #28654.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

dosubot[bot] avatar Dec 24 '25 09:12 dosubot[bot]

There is no official documentation for the /api/remote-files/upload endpoint, but it is required for remote file uploads via API. To use it, send a POST request with a JSON body like {"url": "https://your-remote-file-url"} and include an Authorization header with a Bearer app token (e.g., Authorization: Bearer app-xxxx). The endpoint will download and validate the file, then return an upload_file_id, which you should use in your workflow or chat-messages API call instead of the raw URL. The web UI handles this automatically, but API users must do it manually.

App tokens are the same as those used for other Dify API endpoints—typically generated in the Dify web UI under your app's settings or API keys section. If you can't find where to generate an app token, check your Dify admin panel or deployment documentation for "API Key" or "App Token" management.

For more details and example API calls, see this discussion: Dify Discussion #28998 and Issue #28654.

To reply, just mention @dosu.

How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

Using an api key within the app is not feasible,Error: "App token is missing."

SugarFatFree avatar Dec 25 '25 01:12 SugarFatFree

Image Image

fatelei avatar Dec 25 '25 01:12 fatelei

Image Image

This API key is not feasible. url(http://ip/api/remote-files/upload)

SugarFatFree avatar Dec 25 '25 01:12 SugarFatFree

Image Image

This API key is not feasible. url(http://ip/api/remote-files/upload)

inspect the code

def _is_file_valid_with_config(
    *,
    input_file_type: str,
    file_extension: str,
    file_transfer_method: FileTransferMethod,
    config: FileUploadConfig,
) -> bool:
    # FIXME(QIN2DIM): Always allow tool files (files generated by the assistant/model)
    # These are internally generated and should bypass user upload restrictions
    if file_transfer_method == FileTransferMethod.TOOL_FILE:
        return True

    if (
        config.allowed_file_types
        and input_file_type not in config.allowed_file_types
        and input_file_type != FileType.CUSTOM
    ):
        return False

    if (
        input_file_type == FileType.CUSTOM
        and config.allowed_file_extensions is not None
        and file_extension not in config.allowed_file_extensions
    ):
        return False

    if input_file_type == FileType.IMAGE:
        if (
            config.image_config
            and config.image_config.transfer_methods
            and file_transfer_method not in config.image_config.transfer_methods
        ):
            return False
    elif config.allowed_file_upload_methods and file_transfer_method not in config.allowed_file_upload_methods:
        return False

    return True
``` lead the error `File validation failed for file: 7cceb74ed3c9a5d6.pdf"`

please check the workflow file upload config

![Image](https://github.com/user-attachments/assets/2c889793-9a48-4fb3-8b4b-e466061e40a9)

check the `Upload File Types` config

fatelei avatar Dec 25 '25 02:12 fatelei

图像 图像

此 API 密钥不可用。url(http://ip/api/remote-files/upload)

检查代码

def _is_file_valid_with_config( *, input_file_type: str, file_extension: str, file_transfer_method: FileTransferMethod, config: FileUploadConfig, ) -> bool: # FIXME(QIN2DIM): Always allow tool files (files generated by the assistant/model) # These are internally generated and should bypass user upload restrictions if file_transfer_method == FileTransferMethod.TOOL_FILE: return True

if (
    config.allowed_file_types
    and input_file_type not in config.allowed_file_types
    and input_file_type != FileType.CUSTOM
):
    return False

if (
    input_file_type == FileType.CUSTOM
    and config.allowed_file_extensions is not None
    and file_extension not in config.allowed_file_extensions
):
    return False

if input_file_type == FileType.IMAGE:
    if (
        config.image_config
        and config.image_config.transfer_methods
        and file_transfer_method not in config.image_config.transfer_methods
    ):
        return False
elif config.allowed_file_upload_methods and file_transfer_method not in config.allowed_file_upload_methods:
    return False

return True

``` lead the error File validation failed for file: 7cceb74ed3c9a5d6.pdf"

please check the workflow file upload config

Image

check the Upload File Types config

This is a curl command.

curl -X POST 'http://172.29.0.67/api/remote-files/upload' -H 'Content-Type: application/json' -H 'Authorization: Bearer app-KUB1HZixldciadckzvdqnlLX' -d '{
      "url": "http://172.29.0.66:8080/doc-element-ext/7c/7cceb74ed3c9a5d6/7cceb74ed3c9a5d6.pdf?AWSAccessKeyId=min&Signature=V6PO5%2B2hB4L3W8N451eN1d%2Bk%3D&Expires=1766629264"
    }'

SugarFatFree avatar Dec 25 '25 06:12 SugarFatFree

this is workflow,no features

SugarFatFree avatar Dec 25 '25 06:12 SugarFatFree

this is workflow,no features

in chinese, this is "功能"

fatelei avatar Dec 25 '25 08:12 fatelei

this is workflow,no features

in chinese, this is "功能"

I know. I mean, it doesn't exist in workflow, it exists in chatflow.

SugarFatFree avatar Dec 25 '25 08:12 SugarFatFree

this is workflow,no features

in chinese, this is "功能"

I know. I mean, it doesn't exist in workflow, it exists in chatflow.

Image Image Image

fatelei avatar Dec 26 '25 01:12 fatelei

this is workflow,no features

in chinese, this is "功能"

I know. I mean, it doesn't exist in workflow, it exists in chatflow.

Image Image Image

This is no problem, what I want to know is how to upload remote files through the interface, using this curl call will report an error : App token is missing.

curl -X POST 'http://172.29.0.67/api/remote-files/upload' -H 'Content-Type: application/json' -H 'Authorization: Bearer app-KUB1HZixldciadckzvdqnlLX' -d '{
      "url": "http://172.29.0.66:8080/doc-element-ext/7c/7cceb74ed3c9a5d6/7cceb74ed3c9a5d6.pdf?AWSAccessKeyId=min&Signature=V6PO5%2B2hB4L3W8N451eN1d%2Bk%3D&Expires=1766629264"
    }'

SugarFatFree avatar Dec 26 '25 01:12 SugarFatFree

this is workflow,no features

in chinese, this is "功能"

I know. I mean, it doesn't exist in workflow, it exists in chatflow.

Image Image Image

This is no problem, what I want to know is how to upload remote files through the interface, using this curl call will report an error : App token is missing.

curl -X POST 'http://172.29.0.67/api/remote-files/upload' -H 'Content-Type: application/json' -H 'Authorization: Bearer app-KUB1HZixldciadckzvdqnlLX' -d '{
      "url": "http://172.29.0.66:8080/doc-element-ext/7c/7cceb74ed3c9a5d6/7cceb74ed3c9a5d6.pdf?AWSAccessKeyId=min&Signature=V6PO5%2B2hB4L3W8N451eN1d%2Bk%3D&Expires=1766629264"
    }'

curl -XPOST "http://localhost:5001/console/api/remote-files/upload" -H "Content-Type: application/json" -H "Authorization: Bearer app-qdYk4WLjjYHRpAA7p2ieYpAL" -d '{"url": "https://private-user-images.githubusercontent.com/86815963/530249207-fd464bc8-46de-4c6b-b682-b1a134667bb0.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjY3MTUyNjIsIm5iZiI6MTc2NjcxNDk2MiwicGF0aCI6Ii84NjgxNTk2My81MzAyNDkyMDctZmQ0NjRiYzgtNDZkZS00YzZiLWI2ODItYjFhMTM0NjY3YmIwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTEyMjYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUxMjI2VDAyMDkyMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWI2MjIzZmRlNTE0NWIyN2Q5OWE1MGZhOTEyMTcxYTkxZjc1ZTA2MzQ1ZmQ0OTI2YjBhNjUzMTczM2U3ZmI3YmQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.RDY8qmsWBoKIk_51cvVeh6QZuu-PaKWuch51nrAwjSQ"}' { "code": "remote_file_upload_error", "message": "Failed to fetch file from https://private-user-images.githubusercontent.com/86815963/530249207-fd464bc8-46de-4c6b-b682-b1a134667bb0.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjY3MTUyNjIsIm5iZiI6MTc2NjcxNDk2MiwicGF0aCI6Ii84NjgxNTk2My81MzAyNDkyMDctZmQ0NjRiYzgtNDZkZS00YzZiLWI2ODItYjFhMTM0NjY3YmIwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTEyMjYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUxMjI2VDAyMDkyMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWI2MjIzZmRlNTE0NWIyN2Q5OWE1MGZhOTEyMTcxYTkxZjc1ZTA2MzQ1ZmQ0OTI2YjBhNjUzMTczM2U3ZmI3YmQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.RDY8qmsWBoKIk_51cvVeh6QZuu-PaKWuch51nrAwjSQ: ", "status": 400 }

i copy api key from

Image

fatelei avatar Dec 26 '25 02:12 fatelei

这是工作流程,没有其他功能。

中文是“功能”

我知道。我的意思是,它不存在于工作流中,它存在于聊天流程中。

图像 图像 图像

这没问题,我想知道的是如何通过界面上传远程文件,使用这个 curl 调用会报错:缺少应用程序令牌。

curl -X POST 'http://172.29.0.67/api/remote-files/upload' -H 'Content-Type: application/json' -H 'Authorization: Bearer app-KUB1HZixldciadckzvdqnlLX' -d '{
      "url": "http://172.29.0.66:8080/doc-element-ext/7c/7cceb74ed3c9a5d6/7cceb74ed3c9a5d6.pdf?AWSAccessKeyId=min&Signature=V6PO5%2B2hB4L3W8N451eN1d%2Bk%3D&Expires=1766629264"
    }'

curl -XPOST " http://localhost:5001/console/api/remote-files/upload " -H "Content-Type: application/json" -H "Authorization: Bearer app-qdYk4WLjjYHRpAA7p2ieYpAL" -d '{"url": " https://private-user-images.githubusercontent.com/86815963/530249207-fd464bc8-46de-4c6b-b682-b1a134667bb0.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..RDY8qmsWBoKIk_51cvVeh6QZuu-PaKWuch51nrAwjSQ"} ' { "code": "remote_file_upload_error", "message": "无法从 https://private-user-images.githubusercontent.com/86815963/530249207-fd464bc8-46de-4c6b-b682-b1a134667bb0.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..RDY8qmsWBoKIk_51cvVeh6QZuu-PaKWuch51nrAwjSQ 获取文件: ", "status": 400 }

我从复制了 API 密钥

图像

Not feasible. This API Key cannot be used on this interface. An error will be reported.

curl -X POST 'http://localhost/console/api/remote-files/upload' -H 'Content-Type: application/json' -H 'Authorization: Bearer app-MBqOQzGmxljukx7o8qw89HD8' -d '{
  "url": "http://localhost:9000/doc-element-ext/96/96e5fc6352597187/96e5fc6352597187.pdf?AWSAccessKeyId=miin&Signature=ybJNve7V4G4QheiZ2eIHilK0%3D&Expires=1766736846"
}'
{
  "code": "unauthorized",
  "message": "Invalid token.",
  "status": 401
}

SugarFatFree avatar Dec 26 '25 07:12 SugarFatFree

this is workflow,no features

in chinese, this is "功能"

I know. I mean, it doesn't exist in workflow, it exists in chatflow.

Image Image Image

This is no problem, what I want to know is how to upload remote files through the interface, using this curl call will report an error : App token is missing.

curl -X POST 'http://172.29.0.67/api/remote-files/upload' -H 'Content-Type: application/json' -H 'Authorization: Bearer app-KUB1HZixldciadckzvdqnlLX' -d '{
      "url": "http://172.29.0.66:8080/doc-element-ext/7c/7cceb74ed3c9a5d6/7cceb74ed3c9a5d6.pdf?AWSAccessKeyId=min&Signature=V6PO5%2B2hB4L3W8N451eN1d%2Bk%3D&Expires=1766629264"
    }'

curl -XPOST "http://localhost:5001/console/api/remote-files/upload" -H "Content-Type: application/json" -H "Authorization: Bearer app-qdYk4WLjjYHRpAA7p2ieYpAL" -d '{"url": "https://private-user-images.githubusercontent.com/86815963/530249207-fd464bc8-46de-4c6b-b682-b1a134667bb0.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjY3MTUyNjIsIm5iZiI6MTc2NjcxNDk2MiwicGF0aCI6Ii84NjgxNTk2My81MzAyNDkyMDctZmQ0NjRiYzgtNDZkZS00YzZiLWI2ODItYjFhMTM0NjY3YmIwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTEyMjYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUxMjI2VDAyMDkyMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWI2MjIzZmRlNTE0NWIyN2Q5OWE1MGZhOTEyMTcxYTkxZjc1ZTA2MzQ1ZmQ0OTI2YjBhNjUzMTczM2U3ZmI3YmQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.RDY8qmsWBoKIk_51cvVeh6QZuu-PaKWuch51nrAwjSQ"}' { "code": "remote_file_upload_error", "message": "Failed to fetch file from https://private-user-images.githubusercontent.com/86815963/530249207-fd464bc8-46de-4c6b-b682-b1a134667bb0.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjY3MTUyNjIsIm5iZiI6MTc2NjcxNDk2MiwicGF0aCI6Ii84NjgxNTk2My81MzAyNDkyMDctZmQ0NjRiYzgtNDZkZS00YzZiLWI2ODItYjFhMTM0NjY3YmIwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTEyMjYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUxMjI2VDAyMDkyMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWI2MjIzZmRlNTE0NWIyN2Q5OWE1MGZhOTEyMTcxYTkxZjc1ZTA2MzQ1ZmQ0OTI2YjBhNjUzMTczM2U3ZmI3YmQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.RDY8qmsWBoKIk_51cvVeh6QZuu-PaKWuch51nrAwjSQ: ", "status": 400 }

i copy api key from

Image

psql -U postgres --password dify Password: psql (14.20 (Homebrew)) Type "help" for help.

dify=# select * from api_tokens;

fatelei avatar Dec 26 '25 07:12 fatelei

this is workflow,no features

in chinese, this is "功能"

I know. I mean, it doesn't exist in workflow, it exists in chatflow.

Image Image Image

This is no problem, what I want to know is how to upload remote files through the interface, using this curl call will report an error : App token is missing.

curl -X POST 'http://172.29.0.67/api/remote-files/upload' -H 'Content-Type: application/json' -H 'Authorization: Bearer app-KUB1HZixldciadckzvdqnlLX' -d '{
      "url": "http://172.29.0.66:8080/doc-element-ext/7c/7cceb74ed3c9a5d6/7cceb74ed3c9a5d6.pdf?AWSAccessKeyId=min&Signature=V6PO5%2B2hB4L3W8N451eN1d%2Bk%3D&Expires=1766629264"
    }'

curl -XPOST "http://localhost:5001/console/api/remote-files/upload" -H "Content-Type: application/json" -H "Authorization: Bearer app-qdYk4WLjjYHRpAA7p2ieYpAL" -d '{"url": "https://private-user-images.githubusercontent.com/86815963/530249207-fd464bc8-46de-4c6b-b682-b1a134667bb0.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjY3MTUyNjIsIm5iZiI6MTc2NjcxNDk2MiwicGF0aCI6Ii84NjgxNTk2My81MzAyNDkyMDctZmQ0NjRiYzgtNDZkZS00YzZiLWI2ODItYjFhMTM0NjY3YmIwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTEyMjYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUxMjI2VDAyMDkyMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWI2MjIzZmRlNTE0NWIyN2Q5OWE1MGZhOTEyMTcxYTkxZjc1ZTA2MzQ1ZmQ0OTI2YjBhNjUzMTczM2U3ZmI3YmQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.RDY8qmsWBoKIk_51cvVeh6QZuu-PaKWuch51nrAwjSQ"}' { "code": "remote_file_upload_error", "message": "Failed to fetch file from https://private-user-images.githubusercontent.com/86815963/530249207-fd464bc8-46de-4c6b-b682-b1a134667bb0.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjY3MTUyNjIsIm5iZiI6MTc2NjcxNDk2MiwicGF0aCI6Ii84NjgxNTk2My81MzAyNDkyMDctZmQ0NjRiYzgtNDZkZS00YzZiLWI2ODItYjFhMTM0NjY3YmIwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTEyMjYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUxMjI2VDAyMDkyMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWI2MjIzZmRlNTE0NWIyN2Q5OWE1MGZhOTEyMTcxYTkxZjc1ZTA2MzQ1ZmQ0OTI2YjBhNjUzMTczM2U3ZmI3YmQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.RDY8qmsWBoKIk_51cvVeh6QZuu-PaKWuch51nrAwjSQ: ", "status": 400 } i copy api key from Image

psql -U postgres --password dify Password: psql (14.20 (Homebrew)) Type "help" for help.

dify=# select * from api_tokens;

Image
curl -X POST 'http://172.29.0.34/console/api/remote-files/upload' -H 'Content-Type: application/json' -H 'Authorization: Bearer app-JvTEZlsxtmiTHkAlW4C3q8Ra' -d '{
  "url": "http://172.29.0.66:9000/doc-element-ext/c0/c0e2fe163a25ca02/c0e2fe163a25ca02.pdf?AWSAccessKeyId=minioadmin&Signature=%2BW194qzudd%2FvY1k1YSPxrjKfHXg%3D&Expires=1766976098"
}'
{
  "code": "unauthorized",
  "message": "Invalid token.",
  "status": 401
}

is still not feasible.

SugarFatFree avatar Dec 29 '25 01:12 SugarFatFree