reverted: do not call layout before uploading