upgrade typedfilefield to taking max_size