FAQ about WebOffice features after migrating to the new IMM version

Updated at:

This topic provides frequently asked questions about document preview and editing with WebOffice after migration from the old version of Intelligent Media Management (IMM) to the new version.

Migrate to the new IMM version

Migration steps

You can perform the following steps to migrate to the new version:

  1. Create a project in the new IMM version by using the IMM console or the API operation.

    Note
    • For more information about how to create a project by using the new version of the IMM console, see Create a project.

    • For more information about how to create a project by using the API operation in the new IMM version, see CreateProject.

    • You can call the ListProjects operation to list all projects that were created in a specific region in the new IMM version.

  2. Call the GenerateWebofficeToken operation to generate an access token for document preview or editing. For more information, see GenerateWebofficeToken.

  3. Call the RefreshWebofficeToken operation to refresh an access token for document preview or editing. For more information, see RefreshWebofficeToken.

  4. Use the API operations of the new IMM version in your application.

    • Switch to the new SDK or API.

      • The new IMM version uses the new SDK version. The version number of the new API version is 2020-09-30.

      • The old IMM version uses the old SDK version. The version number of the old API version is 2017-09-06.

    • Create a project in the new IMM version.

Note

For more information about document preview and editing in the new version, see Use WebOffice.

Old and new API operations

API operation comparison

The following table describes the differences between the new and old versions of the API operations for WebOffice features.

Feature

New API version

Old API version

Description

Generate an access token for document preview or editing

GenerateWebofficeToken

GetOfficePreviewURL

In the new IMM version, access tokens for document preview and editing are generated by using the same API operation. Parameter settings determine whether an access token is for document preview or editing.

GetWebofficeURL

Refresh an access token for document preview or editing

RefreshWebofficeToken

RefreshOfficePreviewToken

In the new IMM version, access tokens for document preview and editing are refreshed by using the same API operation.

RefreshWebofficeToken

New parameters

The new IMM version adds the parameters in the following table to the document preview and editing feature.

Parameter

Description

Remarks

PreviewPages

The number of pages that can be previewed from the beginning of the document.

You can specify the number of pages that can be previewed from the beginning of the document. By default, all pages of a document can be previewed. The maximum value of this parameter is 5000.

Password

The password of a password-protected document to preview or edit.

The new IMM version allows you to preview or edit a password-protected document.

ExternalUploaded

Specifies whether to enable document versioning.

The new IMM version allows you to specify whether to upload an edited document to Object Storage Service (OSS) as a new document version.

By default, an edited document is not uploaded. To upload an edited version to OSS, set this parameter to true.

Note

To enable document versioning, you must enable the versioning feature for the OSS bucket. For more information, see Overview.

Parameter changes

The following table describes the parameters that are available for the old API version but not available for the new API version.

Parameter

Description

Remarks

File

The document information.

Not available for the new API version.

FileID

The unique identifier of the document.

Not available for the new API version.

Usage notes

  • The Filename parameter for the new API version and the SrcType parameter for the old API version accept different value formats, although both can indicate the type of the document to preview or edit.

    • The value of the Filename is the file name with the extension included. Example: test-object.docx

    • The value of the SrcType parameter is only the file extension. Example: docx

  • The new API version does not allow you to save an edited document to the specified destination in OSS because it does not have the TgtUri parameter that is available in the old API version. However, you can specify the ExternalUploaded parameter in the new API operation to implement document version management.

  • The User parameter is not required by the new API operation.

    • If you do not specify this parameter, the displayed user name is Unknown.

    • If you specify the User parameter, specify the user ID (Id), user name (Name), and the URL of the user profile (Avatar).

      Important

      When you specify user information, the values of the Id, Name, and Avatar parameters must start with an uppercase letter.

FAQ

How do I fix the "The specified resource acs:imm::1*******:project/TestProjectName is not found." error returned for an API call?

Problem

When I call an API operation, the following error is returned:

The specified resource acs:imm::1*******:project/TestProjectName is not found..

Solution

  1. Log on to the IMM console and check whether you are using the new version of the IMM console.

    • If so, proceed to Step 2.

    • If not, click Try New Version in the lower-left corner and perform Step 2.

  2. Check whether the region selected in the IMM console matches the region of the project.

    • If so, proceed to Step 3.

    • If not, switch the region selected in the IMM console to the same region as the project in the upper-left corner and perform Step 3.

  3. Check whether the project exists in the region. If not, create the project.

Can I preview a document object in Object Storage Service (OSS) that lacks an extension?

Yes, you can preview the document object if you set the Filename parameter to a value that includes an extension.

  • If the name of the document object in OSS does not have an extension, but the Filename parameter value includes one, IMM interprets the document object according to the format specified by the extension in the Filename parameter value.

  • If the name of the document has an extension and the Filename parameter is not specified, IMM interprets the document object according to the extension of the object name.

  • If the name of the document object does not have an extension and the Filename parameter is not specified, IMM cannot recognize the format of the document and reports a preview failure.