Posts in February 2023

[Javascript]DataURL to File and File to DataURL

dataurl and file

In this article, I am going to describe about how to convert DataURL to File and how to convert File to DataURL. DataURL to File Conversion from DataURL to File is possible by combining fetch method and File Api.DataURL is once converted to Blob By fetch method and then converted to File by File Api. You can do any operation againt the […]

[Javascript]DataURL to Blob and Blob to DataURL

dataurl and blob

In this article, I am going to describe about how to convert DataURL to Blob and how to convert Blob to DataURL. DataURL to Blob fetch method might be helpful to convert DataURL to Blob.You can do any operation againt the returned blob in the then method. DataURL to Blob as a function In the […]

[Javascript]How to save ajax result into a variable

Commonly, ajax method is executed asynchronously, and some operation against the result is done in the done method. In this article, I am going to describe about how to save ajax result into a variable instead of processing in the done method. Common usage of ajax Commonly, ajax is used as below.In this way, we have to write the continuation […]

[Javascript]How to save FileReader result into a variable

Commonly, FileReader is executed asynchronously, and some operation against the result is done in the onload event. In this article, I am going to describe about how to save FileReader result into a global variable instead of processing in the onload event. Common usage of FileReader Commonly, FileReader is used as below.Firstly, requesting to convert Blob(or File) […]