Just an update; I am testing a new approach using the Dropbox plugin by septeven. Still having issues however... Really starting to hate this application I'm building! One brick wall after another that I'm banging my head against!
So. New approach.
Live here: http://dev.angelserver.in/IMG_Sharing/
This is what happens:
- On hitting the 'test' button, a snapshot is taken of the layout.
- To prove that a snapshot has been taken, this is loaded into an empty sprite.
- This image is then created on Dropbox, using the data from the CanvasSnapshot:
- Then, to prove that the file has successfully been created in Dropbox, we load the created file into another empty Sprite.
...So. The snapshot has been taken, as this is successfully loaded into the first empty sprite. Check the Dropbox? Yes, the file has been created. Good.
But the resultant image is not loaded into the second empty sprite, suggesting that a problem has occurred at the upload stage. Check the Dropbox again, open the file:
And sure enough, upon downloading the file, it appears to be corrupt. Something appears to be going wrong at the saving/upload stage, but I'm not sure what. There *is* data within "CanvasSnapshot" to be uploaded, however it does not seem to be transferring to the created file on Dropbox.
Of course, the sharing functions then also do not contain images, because they reference the created file on Dropbox which contains a faulty file.
Even stranger is that upon clicking the "Test" button again, an image IS loaded into the second empty sprite - but not of the current Snapshot. I fail to understand where it is getting this data from - it appears to be the last CanvasSnapshot - is it loading the previously saved file?
Not sure what's going on, it's all a bit of a mess.