Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

  • binary field and dmi validation

    Hello, is it possible to use the DMI validation for a binary field?

    I've tried it but in the 'condition' method the value doesn't seem like it's the 6MB file I'm uploading:

    Click image for larger version

Name:	2019-04-18 12.04.36.jpg
Views:	1
Size:	64.2 KB
ID:	257511

  • #2
    Yes, you should be able to read binary files in a validator. This screenshot looks like just the initial buffer created inside the inputStream. Are you saying you actually tried to read it and got only 19 bytes? If so, what were they?

    Comment


    • #3
      Hello, after a 2nd try, I noticed that the 'condition' method is called two times: the first time there's a variable (depends on the file chosen) amount of bytes (do you want the exact values of them?).
      The second time in the value there's the actual file inputStream.
      But then if I read it to check the length, the upload won't work, so it doesn't seem possible to make a 'dynamic' file size validator.

      Comment


      • #4
        We don't want the exact bytes, we just want to know what it is: the filename? The beginning of the file, with the rest inaccessible? Something else?

        Can you reproduce this double validation and strange partial value if you add a DMI validator to any of the upload samples?

        If you were to read the input stream, you would have to replace it's value in the record with the data you have read. Otherwise, yes, the data is inaccessible to any other system.

        Comment

        Working...
        X