While easy and working, I don't like the idea that this bundle sets the vich uploader path included filename back to the object itself. Because if the entity manager is flushed after serialization, it will save the path-prepended file field into the db.
A better way is to ignore both the filename and file object fields, then use the addData() method on post-serialize to add the fully qualified file path to the serialized result. However this requires the user to manually mark the fields as excluded and only works for json since addData() is only available for json type.
Any thoughts?