Shorter regex
Fix bug when uploading several images at once