• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Why is this STATUS API not working?

New Here ,
Feb 25, 2021 Feb 25, 2021

Copy link to clipboard

Copied

I'm trying to use the STATUS_API in my application, but it simply doesn't work. Am I doing it wrong or there anything more to it?

adobeDCView.registerCallback(
    AdobeDC.View.Enum.CallbackType.STATUS_API,
    function (metaData) {
        /* Resolve or reject response in given format */
        /* Status callback success case */
        return new Promise((resolve, reject) => {
            resolve({
                code: AdobeDC.View.Enum.ApiResponseCode.SUCCESS,
            });
        });

        /* Status callback file modified case */
        return new Promise((resolve, reject) => {
            resolve({
                code: AdobeDC.View.Enum.ApiResponseCode.FILE_MODIFIED,
                data: {
                    modifiedBy: {
                        name: "iiii",
                        mail: "mail@mail.com",
                    }
                }
            });
        });
    },
    {
        filePollFrequency: 10,
        keepPolling: true,
    }
);

 

Even after making changes, there is no update on front end, no error on console either 

Views

284

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Feb 26, 2021 Feb 26, 2021

Copy link to clipboard

Copied

Thanks for using PDF Embed API. As suggested in the documentation, you have to write either of the return statement based on your scenario.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 26, 2021 Feb 26, 2021

Copy link to clipboard

Copied

Hi @Shubhanshu Dixit thanks for the update, I got that.

 

Also, can I use status_api without the save_api? Or is it required to save the file before status_api can see the changes?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 26, 2021 Feb 26, 2021

Copy link to clipboard

Copied

LATEST

They work together. The save_api informs the status_api.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources