> For the complete documentation index, see [llms.txt](https://overleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://overleaf-pro.ayaka.space/latex/zh-tw/zhi-shi-ku/081-how-to-upload-a-file-using-an-external-url.md).

# 如何使用外部 URL 上傳檔案

## 簡介

本文說明如何使用 **從外部 URL** 功能將外部代管的檔案上傳到您的 Overleaf 專案。我們先簡短介紹一下，以說明檔案分享連結與直接下載連結。

## 檔案分享連結（URL）

Google Drive、Dropbox、OneDrive 等檔案代管服務可讓使用者安全地分享檔案：建立並提供檔案分享連結（URL），用以限制哪些人可以存取特定檔案，並決定所授予的存取模式：僅檢視或可編輯。收到並選擇或點擊檔案分享連結的人，可能需要先登入（驗證）代管服務才能存取檔案，或者可能會進入一個「登入頁面」，該頁面會顯示檔案預覽，並提供進一步的連結以手動下載檔案。

## 直接下載連結（URL）

一種重要的檔案連結（URL）是 [直接下載連結](https://en.wikipedia.org/wiki/Direct_download_link) 它可讓檔案立即下載，而無需驗證（登入）或經由中介登入頁面或其他介面：點擊/選取直接下載連結會開始下載程序。

若要使用 Overleaf 的 **從外部 URL** 功能，則由 Google Drive、Dropbox 或 OneDrive 等檔案代管服務提供的檔案分享 URL（連結）必須 **轉換** 成直接下載連結（不同的 URL），而轉換流程會依代管網站/雲端服務而有所不同。舉例來說，以下是 [從 Dropbox 連結分享 URL 建立直接下載連結](https://help.dropbox.com/files-folders/share/force-download) 的說明（這些說明在撰寫本文時仍為最新）。

## Overleaf 的從外部 URL 功能

如果您有某個檔案的直接下載連結，您可以使用 Overleaf 的 **從外部 URL** 功能將它上傳到您的專案中。

先選取檔案上傳圖示，然後選擇 **從外部 URL**:

![Overleaf 從外部 URL 功能](/files/c0f1506e198a6138cf2d0890f8596fe93a9e204f)

提供連結並為檔案命名：

* **用於擷取檔案的 URL**：提供來自 Google Drive 等檔案代管服務的直接下載連結（URL）
* **本專案中的檔案名稱**：為上傳的專案檔案命名，名稱中不應包含空格字元

### Google Drive 範例

以下影片示範如何使用 Google Drive 的直接下載連結來上傳專案檔案，並展示如果原始檔案在 Google Drive 上已更新或變更，如何重新整理專案檔案。

{% embed url="<https://videos.ctfassets.net/nrgyaltdicpt/2PMXTshGJI0Kg2ZtN6iXtk/18d4a3168847009a39f905c9acc45e51/Google_drive_upload.mp4>" %}

## 將連結分享 URL 轉換為直接下載 URL 的注意事項

請讀者注意以下幾點：

* 檔案代管服務會變更其連結分享 URL 的結構，例如 [Google Drive 安全性更新](https://support.google.com/a/answer/10685032?hl=en)。由於此類變更，Overleaf 實在無法提供完全文件化的 URL 轉換流程，因為任何說明在發佈後不久就可能過時。讀者應尋找並查閱其所使用代管服務提供的最新文件，或尋找最新的文章或 YouTube 影片。
* 組織／雇主可能會實施安全政策／程序，禁止將用於分享該組織檔案與資源的 URL 轉換為直接下載連結。如果您在將外部檔案上傳到 Overleaf 時遇到困難，請聯絡您組織中檔案分享服務的管理員／負責人，詢問相關事宜。
* 讀者可能會想使用無痕／私人瀏覽器頁面來檢查自己建立的下載連結，以確保在未登入檔案分享服務的情況下也能正常運作。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://overleaf-pro.ayaka.space/latex/zh-tw/zhi-shi-ku/081-how-to-upload-a-file-using-an-external-url.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
