Massive delay between front-end and api results

When ever I delete a file from the front-end this doens't refelect with the API call for a very long time. This is not consistent, sometimes when i delete a file the resultset of my api call will show this (almost) immediately. But once in a while the result set of my API call doesn't change for sometime up too a hour. Some of the files are even still accessible by API call when they are deleted from the frond-end

3replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • day 6 and still not a single reaction?

    Reply Like
  • Hello Tomek, 

    Sorry for the delayed response.

    The delete method is one of considerable processing time therefore when you call a `delete` on a file/folder we actually, behind the scenes, put it into a queue for processing at a later time. This reduces load on our server so that we can maintain a responsive application. You may also notice that when calling the `/path/oper/remove` endpoint we return the contents of a task along with it’s uuid. I.e.
    ```
    {'created': '2018-08-29T14:32:53.368',

    'params': None,

    'result': {'result': None, 'status': 'PENDING'},

    'type': 'Remove',

    'url': '/api/2.1/task/a5ae2738-a0b6-4fe7-aedd-404dcb8b212b/',

    'uuid': 'a5ae2738-a0b6-4fe7-aedd-404dcb8b212b'}

    ```


    This helps the connecting client manage those deletions and react appropriately. For example our frontend application polls the endpoint returned by the remove API call (`/api/2.1/task/a5ae2738-a0b6-4fe7-aedd-404dcb8b212b/`) until it is completed. We then react by removing it from the UI so our users state is consistent with the servers.

    You can access more information about the remove operation at the link below:
    https://app.smartfile.com/api/2/path/oper/remove/

    Reply Like
  • I'm experiencing the same delay when uploading a file , what is the reason for that?

    Reply Like
Like Follow
  • 9 mths agoLast active
  • 3Replies
  • 149Views
  • 2 Following