locked
Web application upload pictures c# offline RRS feed

  • Question

  • User1291657044 posted

    Hi, so I have this C# web application that lets users upload their receipts to a SQL database as a blob and it runs perfectly ok when there is a solid internet connection. They access the application through their iPhones. However, there are instances when they would need to do uploads in a very limited internet speed which will take forever to upload those files (obviously!). Any recommendations as far as what I should do? Increasing the internet speed isn't an option. Any leads would be awesome! 

    Is there a way to upload offline and then sync back once internet access is resumed?

    Monday, May 6, 2019 2:55 PM

All replies

  • User753101303 posted

    Hi,

    They take a photograph of their receipts (coming from uncontrolled sources ?) before uploading them ? It is common to use files having a much higher resolution than needed.

    My first though would be to see if the file size couldn't be reduced possibly using something such as https://gist.github.com/makevoid/1659616

    Monday, May 6, 2019 3:29 PM
  • User1291657044 posted

    Hi PatriceSc, thanks for your prompt response! The users use their iPhone cameras to snap a picture and upload it. I am reducing the size significantly (similar to what you attached) in the C# code before saving it in the database. Appreciate more inputs!

    Monday, May 6, 2019 7:43 PM
  • User288213138 posted

    Hi eyobzeleke,
     

    This is the network problem of the iphone. The website can't control the network. You can let the user re-upload when the network speed is good.


    Best Regard,
    Sam

    Tuesday, May 7, 2019 6:08 AM
  • User1291657044 posted

    Thanks for the response Sam. Is there a way to upload offline and then sync back once internet access is resumed?

    Tuesday, May 7, 2019 1:56 PM
  • User753101303 posted

    What is the current file size ? It is really reduced already to the minimum you can ? Beyond that you can't magically speed up a slow network. If you meant really when being offline it seems hard for files as the client side storage is pretty limited (try perhaps http://robnyman.github.io/html5demos/localstorage/)

    Edit: I remembered also about https://developer.mozilla.org/en-US/docs/Web/API/NetworkInformation/downlink but never tried and it's not widely supported. Else you could estimate an expected response time and offer to save the image if the detected speed is really to slow ???

    My personal preference would be perhaps to see if I couldn't allow users to send them by mail (taking already advantage of the client side mail app) and then having something on the company side to process the dedicated inbox ???

    Tuesday, May 7, 2019 2:59 PM
  • User1291657044 posted

    The current file size is under 100kb to the most part. The latest ones I snapped are 86kb and 59kb.

    Tuesday, May 7, 2019 5:49 PM
  • User288213138 posted

    Hi eyobzeleke,
     
    If there is no network, it cannot be uploaded offline. Offline operation is actually operating in the cloud(such as Azure) when there is no network, and then accessing when there is a network.

     

    Best Regard,
    Sam

    Wednesday, May 8, 2019 9:06 AM
  • User753101303 posted


    If you really have a speed issue with this kind of small files there is likely not much you can do (not sure which kind of performance you have with those "slow speed" networks).

    Else storing that in local storage when offline (or on slow speed detection) might work but make sure if it's worth to invest your time in doing that first (depending if #1 is really that slow ???)

    If I really had to, I would likely see if I couldn't let users to send them by mail (and basically they are just using the offline/online/background send capabilities of the mail app) and would have a job to process the inbox.

    Thursday, May 9, 2019 3:14 PM
  • User1291657044 posted

    ok thank you! I will try the Mail option. 

    Thursday, May 9, 2019 8:36 PM