Filesize of a FileDocument

1
How can I retrieve the filesize of a FileDocument?
asked
2 answers
3

You can also use the community commons package, action Misc > getFileSize

answered
3

Easily done with a small java action

    Double size = 0.0;
    if (__FileObj != null) {
        File f = Core.getFileDocumentContentAsFile(getContext(), __FileObj);
        size = (double) f.length() / 1024;
    }
    return size;
answered