172
Views
8
Comments
Solved
binary data size

Hi,

The file is 0kb but below js code return size 3

debugger

var binaryDataSize =  window.atob($parameters.Binarydata);$parameters.Size =  binaryDataSize.length;

Please suggest

UserImage.jpg
ujwala T
Solution

Resolved with nullbinary check.

Javascript bytes size returns non zero for 0 kb file.

2023-05-23 04-55-55
Wasimkhan Syed Abuthahir

Hi,

You can check binary data size here as well. Can you check by this.


Regards,

Wasimkhan S

2024-03-29 09-44-57
Muskan Jain

Hii Ujwala ,

I share the oml file you can go through this.



Thanks and regards
Muskan Jain


BinaryFileSizeCheck.oml
UserImage.jpg
ujwala T

Hi,


Can you please uploaded 0 byets file and check the outsput wrt javascript

2024-05-22 06-12-56
Vignesh Prakash

Hi @ujwala T

If feasible Can you please share the PDF file along with the OML.

Thanks,
Vignesh Prakash.

UserImage.jpg
ujwala T

Can anyone please sugges,Need to use client side  javascript 

var fileinputelement = window.atob($parameters.PDF);$parameters.Size = fileinputelement.length;

Returning non zero lenght for zero bytes file.

Please suggest


2024-05-22 06-12-56
Vignesh Prakash

Hi @ujwala T,

Kindly share your OML and the file that you are testing.

Thanks,
Vignesh Prakash

UserImage.jpg
ujwala T
Solution

Resolved with nullbinary check.

Javascript bytes size returns non zero for 0 kb file.

2023-04-13 07-10-08
Geertjan Jacobs

@ujwala T 

There's a Forge component that offers binary data size for client side:

https://www.outsystems.com/forge/component-overview/3242/binarydata-client-side-o11

Could be useful and easier to re-use and maintain compared to custom js code. :)

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.