Feature preview

Feature Introduction

How can the pictures in the text be included during batch import, and what are the ways to upload attachments?

When importing articles in bulk, whether the images can be included depends on which path is taken: compressed package import can package the resource directory and text together, table import only carries text, and attachment upload on the interface side is submitted as base64, suitable for small files to be completed within a single request. The applicable quantities and points of the three paths are different, and the most likely to cause problems when mixed is when the image address in the text points to a location that has not yet fallen into the media library.

Media library Batch import

Feature Introduction

How to handle images referenced in the main text when importing articles, and what are the ways of uploading attachments, which depends on which import path is taken: The archive path can package the resource directory and main text together, the table path only carries text, and the interface path relies on separate submission of attachment uploads. AnQiCMS supports two batch import methods: ZIP archive and Excel spreadsheet, and the two paths handle images completely differently. It is more convenient to prepare the files after determining this point than to make adjustments after import.

What are the three sources of images during import?

The first is that the resource file comes in with the text, suitable for whole-site migration or large-scale database construction; the second is that the table only writes text, and the pictures are uploaded separately later or automatically matched with the cover according to the title; the third is to submit small files as attachments when calling the interface. The difference between the three sources does not lie in whether they can carry pictures, but inWhere the pictures fall in the media library and when the address in the text is available.

The most easily stepped pitfall is: the image address is written in the table, pointing to the old site's external link or local temporary directory, and the text displays normally after import. Once the source site is cleaned up, the entire image will crack.

How to add resources to the archive path

The core of the ZIP path is to fix the directory structure: text files, image resource directories, and a list that describes the import sequence. There are three experiences in practice:

  • The resource filenames should be determined before packaging, do not rely on the random strings generated by the export tool, otherwise the relative addresses and filenames in the text will not match;
  • The text uses relative paths to refer to resources, allowing the import program to reposition according to its own directory rules, rather than writing absolute addresses directly;
  • Split the volume of import into batches, do not put hundreds of images in one package, it takes more time to roll back the entire batch when the import fails than to rerun it.

Take this path, and the title auto-matching image can be used as a supplement: For articles without covers, assign images based on the title content to avoid blank thumbnails in the homepage list after batch import.

What scenarios is the table path suitable for?

Excel tables only carry text fields, titles, columns, tags, and publishing time are suitable for it, while images are not. Its strong point isRepeatedly modify the same batch of content: First, check the fields in the table thoroughly, then import them all at once; when images are needed in the main text, either use a compressed package to supplement resources or hand them over to the auto-matching image after import.

If this batch of content itself comes from other sites, it falls within the scope of content collection, and is a separate path from batch import. Don't expect a single table to solve the problem of both getting content and placing images.

Why does the interface upload attachments in base64

Since version 3.6.5, the interface supports submitting attachments in base64, which is beneficial because it can be completed within a single request, without needing to apply for a temporary upload address first and then associate it later. The cost is also clear: the request body is encoded and enlarged, suitable only for small files.

method Can it include images The amount of suitable content Points to note
ZIP compressed package import Yes, package the resource directory together Bulk content of an entire site The file name and directory structure need to be fixed first
Excel table import Text only, no images Medium batch, field-based Replace external links in the text with in-site addresses in advance
Upload interface attachments Single file submission Scattered补图, single article correction Use base64, request body is too large, not suitable for massive resources
Automatic title image matching Generate matching images instead of copying original images Batch articles missing covers Manual inspection required after generation to check if it matches the text

Check which three places after import

The first place is the media library reference: check a few articles to see if the pictures have already fallen on the in-site address rather than the original site address. The second place is the list page thumbnail: missing cover articles are most exposed here. The third place is the failure list: batch imports usually give incomplete records, complete them first before starting the next batch, and do not accumulate.

Common questions

Question: Can the table directly write the picture URL, so that the system can fetch it?Answer: Yes, it can be written, but that is a remote retrieval link that is not within the guaranteed scope of table import. If you really need to batch with images, a zip file is more reliable; the addresses in the table should already point to the in-site media library.

How many articles should be imported at once?Determine the granularity of your batches, and set 'Once a batch can be verified' as the upper limit. The batch size with resource directories should be smaller than the pure text batch, because the cost of rollback is higher due to failure.

Why did the image show normally after import, but cracked after a few days?Most of them are due to the main text address pointing to an external website or temporary directory. The verification method is to check a few articles to see if the image domain is your own site.

Will the same articles be overwritten?Answer: Before batch importing, check duplicates by title first, clean up repeated items in the table; The interface method goes through the in-site import channel (the path of archive and import), and also provides the ability to query whether it already exists by title.

Related functions

Preview

When AI needs to perform a batch of background operations at one time, where should the confirmation step be placed?

When letting AI perform batch background operations through an interface, the confirmation step should be placed before execution and merged by rounds: read operations should return directly, and write operations should be summarized into one confirmation within the same round before being implemented. Round-level approval refers to this level, not individual pop-up confirmations.

Preview

What is the risk difference between using one-time tickets or long-term keys for login credentials when switching sites?

The login credentials used for switching sites, the difference between one-time tickets and long-term keys lies in the validity period and replayability: tickets should have a short validity period and be used only once, while long-term keys can be used repeatedly within the validity period if forged or leaked. AnQiCMS fixed the issue of login credentials for site switching being forged in v3.6.6. The upgrade recommendation includes rotating the signature key and changing the administrator's password, which is also the direct reason for doing rotation and upgrade together.

Preview

Who is responsible for the email subscription list when the update needs to be sent to the subscribers

When updating the website and notifying subscribers, email subscription and email reminder are two different capabilities: email subscription is aimed at readers, consisting of a front-end entry, confirmation action, and unsubscribe processing; email reminder is aimed at in-site managers, responsible for internal notifications such as publishing exceptions, navigation, and inspection of friend links. The list affiliation, sending time, and maintenance responsibilities of both should be separately configured, and mixing them on a single list is the most common operational incident.