File upload knowing size in advance