I’m making an application where the user can upload a texture that is then displayed on a 3D model.
My current solution: The user uploads an image file through html form / php script. Php script always saves the texture under the same name, e.g. newTexture.jpg, and then forwards the user to the webplayer. Webplayer opens newTexture.jpg, and puts it on the model.
The possible problem: If two users were to upload their file at the same time, I think it might be possible that one overwrites the others file before the webplayer has loaded, so that both end up with the same picture, even though one of them uploaded a different one.
Is there a better way to do this? Are there best practices to communicate between php and webplayer?