This commit is contained in:
github-merge-queue[bot]
2025-06-10 18:11:42 +00:00
parent c9be1a5c1f
commit f6ae5b7b1d
216 changed files with 217 additions and 215 deletions

View File

@ -21,7 +21,7 @@
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Sora:wght@550;600&amp;display=swap">
<script>!function(){window.semaphore=window.semaphore||[],window.ketch=function(){window.semaphore.push(arguments)};var e=document.createElement("script");e.type="text/javascript",e.src="https://global.ketchcdn.com/web/v3/config/datastax/langflow_org_web/boot.js",e.defer=e.async=!0,document.getElementsByTagName("head")[0].appendChild(e)}()</script>
<script defer="true">!function(){const e=e=>{if(window.gtag&&e.purposes&&"analytics"in e.purposes&&"targeted_advertising"in e.purposes){const n=!0===e.purposes.analytics?"granted":"denied",t=!0===e.purposes.targeted_advertising?"granted":"denied",a={analytics_storage:n,ad_personalization:t,ad_storage:t,ad_user_data:t};window.gtag("consent","update",a)}};window.ketch&&window.ketch("on","consent",e)}()</script><link rel="stylesheet" href="/assets/css/styles.30cf3ea6.css">
<script src="/assets/js/runtime~main.dd6341ce.js" defer="defer"></script>
<script src="/assets/js/runtime~main.3f58fe66.js" defer="defer"></script>
<script src="/assets/js/main.8d713cb6.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
@ -210,7 +210,9 @@ To create a Langflow API key and export it as an environment variable, see <a hr
<div class="ch-codeblock not-prose" data-ch-theme="github-dark"><div class="ch-code-wrapper ch-code" data-ch-measured="false"><code class="ch-code-scroll-parent"><br><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>{&quot;id&quot;:&quot;07e5b864-e367-4f52-b647-a48035ae7e5e&quot;,&quot;username&quot;:&quot;langflow&quot;,&quot;profile_image&quot;:null,&quot;store_api_key&quot;:null,&quot;is_active&quot;:true,&quot;is_superuser&quot;:true,&quot;create_at&quot;:&quot;2025-05-08T17:59:07.855965&quot;,&quot;updated_at&quot;:&quot;2025-05-28T19:00:42.556460&quot;,&quot;last_login_at&quot;:&quot;2025-05-28T19:00:42.554338&quot;,&quot;optins&quot;:{&quot;github_starred&quot;:false,&quot;dialog_dismissed&quot;:true,&quot;discord_clicked&quot;:false,&quot;mcp_dialog_dismissed&quot;:true}}</span></div></div><br></code></div></div>
<p>In the POST request to <code>v2/files</code>, replace <strong>@FILE_NAME.EXTENSION</strong> with the uploaded file name and its extension.
You must include the ampersand (<code>@</code>) in the request to instruct curl to upload the contents of the file, not the string <code>FILE_NAME.EXTENSION</code>.</p>
<div class="tabs-container tabList__CuJ"><ul role="tablist" aria-orientation="horizontal" class="tabs"><li role="tab" tabindex="0" aria-selected="true" class="tabs__item tabItem_LNqP tabs__item--active">curl</li></ul><div class="margin-top--md"><div role="tabpanel" class="tabItem_Ymn6"><div class="ch-codeblock not-prose" data-ch-theme="github-dark"><div class="ch-code-wrapper ch-code" data-ch-measured="false"><code class="ch-code-scroll-parent"><br><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>curl -X POST \</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span> &quot;$LANGFLOW_URL/api/v2/files&quot; \</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span> -H &quot;accept: application/json&quot; \</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span> -H &quot;Content-Type: multipart/form-data&quot; \</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span> -H &quot;x-api-key: $LANGFLOW_API_KEY&quot; \</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span> -F &quot;file=@FILE_NAME.EXTENSION&quot;</span></div></div><br></code></div></div><p>The file is uploaded in the format <code>USER_ID/FILE_ID.FILE_EXTENSION</code>, and the API returns metadata about the uploaded file:</p><div class="ch-codeblock not-prose" data-ch-theme="github-dark"><div class="ch-code-wrapper ch-code" data-ch-measured="false"><code class="ch-code-scroll-parent"><br><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>{</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span> &quot;id&quot;:&quot;d44dc2e1-9ae9-4cf6-9114-8d34a6126c94&quot;,</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span> &quot;name&quot;:&quot;engine_manual&quot;,</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span> &quot;path&quot;:&quot;07e5b864-e367-4f52-b647-a48035ae7e5e/d44dc2e1-9ae9-4cf6-9114-8d34a6126c94.pdf&quot;,</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span> &quot;size&quot;:851160,</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span> &quot;provider&quot;:null</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>}</span></div></div><br></code></div></div></div></div></div>
<div class="ch-codeblock not-prose" data-ch-theme="github-dark"><div class="ch-code-wrapper ch-code" data-ch-measured="false"><code class="ch-code-scroll-parent"><br><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>curl -X POST \</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span> &quot;$LANGFLOW_URL/api/v2/files&quot; \</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span> -H &quot;accept: application/json&quot; \</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span> -H &quot;Content-Type: multipart/form-data&quot; \</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span> -H &quot;x-api-key: $LANGFLOW_API_KEY&quot; \</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span> -F &quot;file=@FILE_NAME.EXTENSION&quot;</span></div></div><br></code></div></div>
<p>The file is uploaded in the format <code>USER_ID/FILE_ID.FILE_EXTENSION</code>, and the API returns metadata about the uploaded file:</p>
<div class="ch-codeblock not-prose" data-ch-theme="github-dark"><div class="ch-code-wrapper ch-code" data-ch-measured="false"><code class="ch-code-scroll-parent"><br><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>{</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span> &quot;id&quot;:&quot;d44dc2e1-9ae9-4cf6-9114-8d34a6126c94&quot;,</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span> &quot;name&quot;:&quot;engine_manual&quot;,</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span> &quot;path&quot;:&quot;07e5b864-e367-4f52-b647-a48035ae7e5e/d44dc2e1-9ae9-4cf6-9114-8d34a6126c94.pdf&quot;,</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span> &quot;size&quot;:851160,</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span> &quot;provider&quot;:null</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>}</span></div></div><br></code></div></div>
<h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="send-files-to-your-flows-v2">Send files to your flows (v2)<a href="#send-files-to-your-flows-v2" class="hash-link" aria-label="Direct link to Send files to your flows (v2)" title="Direct link to Send files to your flows (v2)"></a></h3>
<p>Send a file to your flow for analysis using the <a href="/components-data#file">File</a> component and the API.
Your flow must contain a <a href="/components-data#file">File</a> component to receive the file.</p>