### Install PicGo via Scoop (Windows) Source: https://picgo.github.io/PicGo-Doc/guide Installs PicGo on Windows using the Scoop package manager. This involves adding the 'extras' bucket and then installing the 'picgo' package. ```bash scoop bucket add extras scoop install picgo ``` -------------------------------- ### Install PicGo via Chocolatey (Windows) Source: https://picgo.github.io/PicGo-Doc/guide Installs PicGo on Windows using the Chocolatey package manager. This command directly installs the 'picgo' package. ```powershell choco install picgo ``` -------------------------------- ### Install PicGo via AUR (Arch Linux) Source: https://picgo.github.io/PicGo-Doc/guide Installs PicGo on Arch Linux from the Arch User Repository (AUR) using 'yay'. This command fetches and builds the 'picgo-appimage' package. ```bash yay -S picgo-appimage ``` -------------------------------- ### Install PicGo via Homebrew (macOS) Source: https://picgo.github.io/PicGo-Doc/guide Installs PicGo on macOS using the Homebrew package manager. The '--cask' flag is used for GUI applications. ```bash brew install picgo --cask ``` -------------------------------- ### PicGo Development: Start Dev Workflow Source: https://picgo.github.io/PicGo-Doc/guide Starts the development server for PicGo with hot-reloading enabled. This command uses 'pnpm' to run the 'dev' script defined in the project's package.json. ```bash pnpm run dev ``` -------------------------------- ### PicGo Development: Build Release Artifacts Source: https://picgo.github.io/PicGo-Doc/guide Builds the release artifacts for PicGo, generating installer files. This command uses 'pnpm' to run the 'build' script, which utilizes 'electron-builder'. ```bash pnpm run build ``` -------------------------------- ### Configure GitHub Image Host Source: https://picgo.github.io/PicGo-Doc/guide/config Configuration for using GitHub as an image host. Requires repository details (user/repo), a GitHub token, storage path, optional custom domain, and branch. A GitHub token is generated once and must be backed up. Images are stored as files in the specified repository. ```json { "repo": "", // user/repo "token": "", // github token "path": "" // storage path "customUrl": "", // customized domain "branch": "" // branch, main by default } ``` -------------------------------- ### Clone PicGo Repository Source: https://picgo.github.io/PicGo-Doc/guide Clones the PicGo project repository from GitHub to your local machine using Git. This is the first step for local development. ```bash git clone https://github.com/Molunerfinn/PicGo.git ``` -------------------------------- ### Upload Image via Command Line (Windows) Source: https://picgo.github.io/PicGo-Doc/guide/advance This command allows users on Windows to upload images using PicGo directly from the command line. Ensure the correct path to your PicGo executable is provided. ```bash PATH\PicGo.exe upload ``` -------------------------------- ### SM.MS Image Host Configuration (JSON) Source: https://picgo.github.io/PicGo-Doc/guide/config Configuration settings for the SM.MS image host. This includes a token for authentication and an optional backup domain for alternate uploads. Ensure you have a valid API token from SM.MS. ```json { "token": "", // your api token "backupDomain": "" // v2.3.1 Support alternate upload domain, optional. Recommended smms.app } ``` -------------------------------- ### Qiniu Image Host Configuration (JSON) Source: https://picgo.github.io/PicGo-Doc/guide/config Configuration for the Qiniu image host. Requires access key, secret key, bucket name, and optionally a custom URL, storage area, URL suffix options, and storage path. The 'area' field must correspond to a valid Qiniu storage zone. ```json { "accessKey": "", "secretKey": "", "bucket": "", // storage bucket "url": "", // customized domain "area": "z0" | "z1" | "z2" | "na0" | "as0", // storage area "options": "", // URL suffix "path": "" // storage path } ``` -------------------------------- ### Upload Image via Command Line (Linux) Source: https://picgo.github.io/PicGo-Doc/guide/advance This command facilitates image uploads using PicGo on Linux systems via the command line. Users need to specify the correct path to their PicGo AppImage. ```bash PATH/PicGo.AppImage upload ``` -------------------------------- ### PicGo Development: Set Electron Mirror Source: https://picgo.github.io/PicGo-Doc/guide Sets an alternative mirror for downloading Electron binaries when building PicGo. This is useful for unstable networks. The command is shown for both Linux/macOS (bash) and Windows (cmd). ```bash export ELECTRON_MIRROR="https://npmmirror.com/mirrors/electron/" pnpm run build # On Windows: # set ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ pnpm run build ``` -------------------------------- ### Configure Aliyun OSS Storage Source: https://picgo.github.io/PicGo-Doc/guide/config Configuration for Aliyun Object Storage Service (OSS). Requires access key ID, access key secret, bucket name, storage area, optional storage path, and optional custom domain. Images are stored in the specified bucket and path. ```json { "accessKeyId": "", "accessKeySecret": "", "bucket": "", // storage bucket "area": "", // storage area "path": "" // storage path "customUrl": "", // customized domain } ``` -------------------------------- ### Upload using Command Line (2.1.0+) Source: https://picgo.github.io/PicGo-Doc/guide/advance PicGo supports uploading images directly from the command line. You can upload the image on your clipboard or specify a file path. ```APIDOC ## Upload using Command Line ### Description PicGo allows you to upload images using the command line interface. Supported actions include uploading the current clipboard image or a specified image file. ### Method Command Line Execution ### Endpoints **Windows:** `PATH\PicGo.exe upload` or `PATH\PicGo.exe upload path/to/image.jpg` **macOS:** `/Applications/PicGo.app/Contents/MacOS/PicGo upload` or `/Applications/PicGo.app/Contents/MacOS/PicGo upload path/to/image.jpg` **Linux:** `PATH/PicGo.AppImage upload` or `PATH/PicGo.AppImage upload path/to/image.jpg` ### Parameters - **(Implicit)**: The command automatically detects the image from the clipboard or uses the provided file path. ### Request Example ```bash # Upload clipboard image on Windows C:\Program Files\PicGo\PicGo.exe upload # Upload specific image on macOS /Applications/PicGo.app/Contents/MacOS/PicGo upload ~/Pictures/my_image.png ``` ### Response (Command line output indicating success or failure with URLs) ``` -------------------------------- ### Configure Upyun Cloud Storage Source: https://picgo.github.io/PicGo-Doc/guide/config Configuration for Upyun cloud storage, including bucket, operator, password, path, and custom domain. Note that v4 and v5 bucket configurations may differ. It's recommended to use a third-party web panel for Upyun operations due to the lack of an intuitive control panel. ```json { "bucket": "", // storage bucket, note that v4 is different from v5 "operator": "", // operator "password": "", // password "options": "", // URL suffix "path": "" // storage path "url": "" // customized domain } ``` -------------------------------- ### Configure Imgur Image Host Source: https://picgo.github.io/PicGo-Doc/guide/config Configuration for Imgur image hosting. Requires a client ID obtained from Imgur and an optional HTTP proxy address. Imgur has IP and request restrictions, especially in mainland China, so a proxy might be necessary. ```json { "clientId": "", // your clientId "proxy": "" // proxy address, only http supported } ``` -------------------------------- ### PicGo Settings: Customized Shortcuts Source: https://picgo.github.io/PicGo-Doc/guide/config Allows users to define custom keyboard shortcuts for PicGo actions. Supports single key combinations (e.g., Cmd+Shift+P on macOS, Ctrl+Shift+P on Windows) and combined shortcuts. Introduced in v1.4.0 and enhanced with plugin shortcut support in v2.2.0. ```json // Example of shortcut configuration (actual structure may vary) { "shortcuts": [ { "name": "upload", "key": "Cmd+Shift+P" }, { "name": "upload_and_copy", "key": "Ctrl+Shift+C" } ] } ``` -------------------------------- ### Upload Image via Command Line (macOS) Source: https://picgo.github.io/PicGo-Doc/guide/advance This command enables users on macOS to upload images using PicGo from the terminal. The specified path is the default location for the PicGo application. ```bash /Applications/PicGo.app/Contents/MacOS/PicGo upload ``` -------------------------------- ### PicGo Settings: Upload Logs Source: https://picgo.github.io/PicGo-Doc/guide/config Enables logging of upload activities, including successes and failures, for debugging and feedback to developers. Log file size can be configured (default 10MB since v2.3.1). Logs can be accessed through PicGo's settings. ```json // Example structure for log settings (actual implementation may vary) { "logLevel": "info", // e.g., "info", "error", "debug" "logFileSizeMB": 10 } ``` -------------------------------- ### PicGo Settings: Customized Link Format Source: https://picgo.github.io/PicGo-Doc/guide/config Enables customization of the output format for uploaded image links. Supports preset formats like Markdown, HTML, URL, UBB, and a custom format. Supports dynamic variables like $fileName (since v2.1.2) and $extName (since v2.3.1). ```json // Example of custom link format configuration { "linkFormat": "custom", "customLinkFormat": "![${fileName}](${url})" } ``` -------------------------------- ### PicGo-Server Usage (2.2.0+) Source: https://picgo.github.io/PicGo-Doc/guide/advance PicGo includes a built-in server that listens for HTTP requests to upload images. It supports uploading clipboard images, specific images via JSON, and files via multipart form-data. ```APIDOC ## PicGo-Server Usage ### Description PicGo features an integrated server that accepts HTTP requests for image uploads. It can handle various upload methods including clipboard content, specified file paths via JSON payload, and direct file uploads using multipart form-data. ### Method `POST` ### Endpoint `http://127.0.0.1:36677/upload` (Default address and port) ### Parameters #### Request Body (Clipboard Upload) - **(Implicit)**: The server uploads the image currently present in the clipboard. #### Request Body (Specific Image Upload) - **list** (array of strings) - Required - A JSON array containing the paths to the images to be uploaded. #### Request Body (HTTP Form Data Upload) - **files** (file) - Required - The image file to be uploaded. Supports multiple files. ### Request Example #### Clipboard Upload ```http POST /upload HTTP/1.1 Host: 127.0.0.1:36677 Content-Type: application/json {} ``` #### Specific Image Upload ```http POST /upload HTTP/1.1 Host: 127.0.0.1:36677 Content-Type: application/json { "list": ["/path/to/your/image.jpg"] } ``` #### HTTP Form Data Upload ```http POST /upload HTTP/1.1 Host: 127.0.0.1:36677 Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW ------WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="files"; filename="my_image.png" Content-Type: image/png [binary image data] ------WebKitFormBoundary7MA4YWxkTrZu0gW-- ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the upload was successful. - **result** (array of strings) - A list of URLs for the uploaded images. #### Response Example ```json { "success": true, "result": ["http://your-cdn.com/image.png"] } ``` ``` -------------------------------- ### Upload Image via PicGo-Server HTTP POST Source: https://picgo.github.io/PicGo-Doc/guide/advance PicGo-Server listens on a default address and port to receive HTTP POST requests for image uploads. This method is used to upload an image from the clipboard. The response includes a success status and a list of resulting URLs. ```http POST /upload HTTP/1.1 Host: 127.0.0.1:36677 { "success": true, "result": ["url"] } ``` -------------------------------- ### Tencent Cloud COS Configuration (JSON) Source: https://picgo.github.io/PicGo-Doc/guide/config Configuration for Tencent Cloud COS (Cloud Object Storage). Requires secret ID, secret key, bucket name, App ID, storage area, and optionally a custom URL, COS version, endpoint, and slim settings for smart compression. Supports both v4 and v5 versions of COS. ```json { "secretId": "", "secretKey": "", "bucket": "", // storage bucket, note that v4 is different from v5 "appId": "", "area": "", // storage area "path": "", // storage path "customUrl": "", // customized domain "version": "v5" | "v4", // COS version "endpoint": "", // Tencent Cloud endpoint, e.g. cos.accelerate.myqcloud.com "slim": "" // whether to enable Smart Compression } ``` -------------------------------- ### Upload Specific Image via PicGo-Server HTTP POST Source: https://picgo.github.io/PicGo-Doc/guide/advance This endpoint allows uploading a specific image by providing its path in the request body as a JSON-formatted object. The server responds with upload status and URLs. ```http POST /upload HTTP/1.1 Host: 127.0.0.1:36677 Content-Type: application/json { "list": ["xxx.jpg"] } { "success": true, "result": ["url"] } ``` -------------------------------- ### Upload Images via PicGo-Server HTTP Form Data Source: https://picgo.github.io/PicGo-Doc/guide/advance PicGo-Server supports multipart form-data uploads, allowing multiple files to be sent in a single request. The 'files' key in the form data should contain the image file(s). ```http POST /upload HTTP/1.1 Host: 127.0.0.1:36677 Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW ------WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; files ------WebKitFormBoundary7MA4YWxkTrZu0gW-- { "success": true, "result": ["url"] } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.