In a pathological case, a file being uploaded that has the same name as an existing file ID-prefixed file may overwrite it before it gets its own ID prepended in cache.Put. Should use a temp location (either in the data directory or in os.TempDir()) prior to prepending the file ID.