Skip to content

Other Usage

The command line usage and server usage of PicList are all based on the usage of PicGo, and the manual is also modified based on the manual of PicGo.

Command Line Upload

PicList supports command line invocation for upload.

The upload command is upload (for uploading clipboard images) and upload xxx.jpg for uploading specific path images.

Windows

Windows can call upload through the path where you installed PicList\PicList.exe upload.

macOS

macOS can call upload through /Applications/PicList.app/Contents/MacOS/PicList upload.

Linux

Linux can call upload through the path where you installed PicGo/PicList.AppImage upload.

Use of Built-in Server

PicList has a built-in small server for receiving HTTP requests from other applications to upload images.

Default listening address: 0.0.0.0, default listening port: 36677

Interface Authentication

When the interface is exposed to the public network, in order to prevent malicious upload, PicList provides interface authentication function.

202310102349225

When sending a request, add the URL query parameter key, for example: http://xxx:36677/upload?key=xxx.

Form Upload 2.6.3+

  • Request method: POST
  • url: http://127.0.0.1:36677/upload (taking the default configuration as an example here)
  • request body: multipart/form-data format, key is optional, value is image file

It can be uploaded.

HTTP Upload Clipboard Images by Calling

  • Request method:: POST
  • url: http://127.0.0.1:36677/upload (taking the default configuration as an example here)

It can be uploaded.

Returned data:

json
{
  "success": true, // or false
  "result": ["url"]
}

HTTP Upload Specific Path Images by Calling

  • method: POST
  • url: http://127.0.0.1:36677/upload (taking the default configuration as an example here)
  • request body: {list: ['xxx.jpg']} must be in JSON format

Tip

PicList supports specifying the upload image bed and configuration file by setting the two URL query parameters picbed and configName. For example: http://127.0.0.1:36677/upload?picbed=aws-s3&configName=piclist-test This configuration will use the aws-s3 image bed and the piclist-test configuration file.

Returned data:

json
{
  "success": true, // or false
  "result": ["url"]
}

HTTP Call to Delete Images

  • method: POST
  • url: http://127.0.0.1:36677/delete (taking the default configuration as an example here)
  • request body: {list: [{xx:xx}]} must be in JSON format

Each item in the list is an object composed of the fullResult field returned by the upload interface.

Returned data:

json
{
  "success": true, // or false
  "message": xxx
}

heartbeat

  • method: GET or POST
  • url: http://127.0.0.1:36677/heartbeat (taking the default configuration as an example here)
  • request body: {}

Returned data:

json
{
  "success": true, // or false
  "result": "alive"
}

api document

  • method: GET
  • url: http://127.0.0.1:36677 or http://127.0.0.1:36677/upload

After starting the server, you can access the server's API documentation through the browser.

Use of Built-in File Web Server

PicList supports accessing local files through the built-in file Web server, which can be enabled and set in Settings-Advanced Settings-Set Web Service, similar to the functions of EasyWebServer software or the python -m http.server command.

Default listening address: 0.0.0.0, which is all IP addresses on the local machine

Default listening port: 37777

Default listening address: In Windows, the default address is C:\\Users, and in macOS and Linux, the default address is the root directory /.

In the browser, enter http://127.0.0.1:37777 to access and view local files.

202405101519434

Tip

The port cannot be set to 36699 because this port is occupied by the PicList built-in service.

PicHoro Mobile Client Linkage

If you want to use similar functions of PicList on your mobile phone, you can install another project of mine: PicHoro

You can find the "Generate PicBed Config QR Code" menu by clicking the information bar button in the lower left corner of the main window.

image

Then, through the scanning function of PicHoro, import the PicBed configuration with one click.

Released under the MIT License.