javascriptangulartypescriptfile-uploadspeed-test

Angular - how to test Internet upload speed without backend?


I want to upload file into folder from which my Angular app is served while running on localhost. I'm not able to find any solution without using backend.

For example I just want to upload an image file and that file should copy in specified folder of the project. This should be done only with Angular without using any Backend script or hitting any API endpoint.


Solution

  • Depending on your webhost, you can make your assets-folder accessible via FTP. Making a FTP-call from javascript (angular is javascript) isn't that difficult. And there are plenty of example and questions about it on the internet (like this)

    Why you wouldn't do that:

    Edit:

    As I read your question again and all the sub-answers, I (think) figured out that you are building an native-like app with no back-end, just an angular-single page front-end application. An I can understand why (you can run this on every platform in an application that supports javascript), but the problem you are encountering is only the first of a whole series.

    If this is the case, I wouldn't call it uploadingas you would store it locally.

    But the good news is that you have localstoragefor your use to store temporary data on the HDD of the client. It isn't a very large space but it is something...