Fix file support in PUT requests

Hi, I realized I forgot to not serialize data in PUT requests as well, this should fix it, cheers.