Uploading a Sandbox File - Windows 32 App

I have a Windows 32 App.  In the App you can create an image which is saved to the apps temporary directory.  I then attempt to upload this image to a cloud server location through the network.upload method.

This works fine in the corona simulator and when used in an App, but when I compile the App and run it as a Win 32 EXE it fails.  The error is “Unknown error”.  Nothing is hitting our servers and we have tried to run it locally.

I am sure this used to work.  The weird thing is that the file is accessible - I can display it within the App - but the network.upload just seems to generate this error.

Any ideas?  Has this been disabled for Win32?

Where are you writing the file to?
 

Fixed it I think. Strange one. The user draws on the screen. That drawing is then saved to file. When the overlay closes I display the drawn image. When the use saves I am uploading the image.

Just before the upload I remove the image from the screen otherwise the file is locked.

The change I have made is put a 500 millisecond delay before the upload. It looks like on Windows if you remove the image and then immediately try and upload the file lock is still in place.

Used a timer,performWithDelay and works. Shame the error was Unknown Error. Took me 4 hours to find the issue…! :slight_smile:

We hit a similar issue in our games, only rather than uploading we hit the lock when the user was trying to delete a photo taken from our in-game camera ( weirdly also being able to be drawn on ). 

Where are you writing the file to?
 

Fixed it I think. Strange one. The user draws on the screen. That drawing is then saved to file. When the overlay closes I display the drawn image. When the use saves I am uploading the image.

Just before the upload I remove the image from the screen otherwise the file is locked.

The change I have made is put a 500 millisecond delay before the upload. It looks like on Windows if you remove the image and then immediately try and upload the file lock is still in place.

Used a timer,performWithDelay and works. Shame the error was Unknown Error. Took me 4 hours to find the issue…! :slight_smile:

We hit a similar issue in our games, only rather than uploading we hit the lock when the user was trying to delete a photo taken from our in-game camera ( weirdly also being able to be drawn on ).