DEV Community

Cover image for Retry and Recursion in asynchronous Vuex Actions - a naïve approach to Firebase Image Resizing

Retry and Recursion in asynchronous Vuex Actions - a naïve approach to Firebase Image Resizing

Anton Reindl on July 01, 2021

In a web application we have recently built using Vue.js and Firebase, we needed an image uploader that enables the user to upload images (e.g. a p...
Collapse
 
notflip profile image
Miguel Stevens

I'm trying to solve the exact same issue! Very interesting read, you say this method is naive and doesn't cover all use cases, Isn't this a situation that happens a lot? What is the method by-the-book to cover a situation like this?

Collapse
 
areindl profile image
Anton Reindl

Thanks Miguel. It’s naive because i do not have any special heuristic if 10 times retry is enough. No model, network properties or image properties.

I did some research back then but could not find a by-the-book solution. If have this code in production and so far it works very well. I monitoring it with Sentry and it works reliable