6 Replies Latest reply: Feb 4, 2016 4:05 AM by Oriol TG RSS

    Problem with replace REST function

    Oriol TG

      Hello,

       

      I have been able to develope an application that using the rest funcions from the server can upload qvf to the server, publish them and in the case that exist published, replace the published file for the new one.

      The problem is that to do that I upload a qvf with a temp name, replace the published aplication and them delete the temp file. After doing that the published aplication loses the preview image.

       

      I supose that it happens because it keep the reference images instead of creating new ones using the new references, but doing the same operations with the server (upload manually a new qvf, publish replacing the old published qvf, and then deleting the uploaded qvf) it preserves the preview image of the qvf on the hub page.

       

      Is there any step I forgot to do or I did on the wrong way something?

       

      Thanks

       

      PD For new published files it also preserve the preview image, but I need to do the replace functions because If the user created new sheets and the qvf needs to be updated I want to avoid the lose of user data that would happen If I simply destroy the old published qvf and publish a new one.

        • Re: Problem with replace REST function
          Tomasz Hyzopski

          Hi oriol_tg

           

          Have you a piece of working code with REST REPLACE method? Can you share it?


          We get the response from the server: "403 Prohibited." for every PUT REST API's methods (REPLACE, PUBLISH etc.). GET/POST methods work properly.


          Big thanks!

          TH

          • Re: Problem with replace REST function
            Oriol TG

            For the people interested we have found that there's a bug on the replace function of Qlik Sense.

            At first moment we thought that we have a problem when we uploaded a qvf, used the replace function to replace the file of an existing published app and then we delete the original uploaded file losing the thumbnail of the published one.

            But we performed the same operations on Qlik Sense Server and it happens the same:

            - We clicked the import button uploading the file.

            - Then we published the file with the publish button specifying to replace an existing published file with the checkbox Replace existing file.

            - After that we deleted the original uploaded file and then we lost the thumbnail of the published file.

             

            So we are thinking that when one publish a file with the replace function, the thumbnail image keeps linked with the original uploaded file instead of having its own so if that file is removed the published one loses that image.