Fixed the bug that all subsequent file uploads don't generate a thumbnail.

#changelog fixes #422