- Home /
Issue with multiple users uploading own texture to the game
Hi everyone,
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?
Answer by Kajos · May 27, 2013 at 01:18 PM
This seems very implementation dependent, you might want to give some additional code/steps. Either way, possibly you could attach a timestamp to fix the problem. Also, consider notifying the client when an image has been uploaded instead of letting the client only fetch the image at start time (if you're doing this).
Your answer
Follow this Question
Related Questions
PHP high score variable help? 1 Answer
Using PHP to generate objects or list in Unity with C# 2 Answers
Uploading problem, GUI Missing 0 Answers
Upload a text file to my server? 0 Answers
PHP Sessions from WWW 1 Answer