microsoft / Power-Fx

Power Fx low-code programming language
MIT License
3.18k stars 318 forks source link

File types #1725

Open MikeStall opened 1 year ago

MikeStall commented 1 year ago

Do we need a file type?

This may be a purely SDK issue - from a language perspective, these would look like Records. Existing type checks should also ensure that we can't assign between real files and records.

Robulane commented 1 year ago

Also, we need to think how do we want to model this. One way is that the file is just the array of bytes. Another way is that the file is an array of bytes + metadata such as name, mime type.

Independently of the representation, we should have a way to:

  1. Get the file length
  2. Get Base64, maybe using Text function

For our needs, "Binary" format can be enough.