network.upload timeout only on newly created images

I’m using display.save to make an image.

If I try to use network.upload to upload to Parse, the request times out.

Now, if I restart the simulator and instead hard code in the same file, it works.

This makes absolutely no sense, it’s the same information going in. Only thing I can think is that the newly created image is in memory or “too new.”

Thank you.

Suggestion:  Try this experiment.

  1. Save the image like you’re doing now,

  2. Then use the image to create a new object instead of trying to upload it.

If this fails too, then you’ll know you’re not giving enough time for the file to be saved or running to another issue.

In either case, try deferring the upload for a few frames:

-- -- 1. Save -- Code to save image here. -- -- 2. Deferred upload timer.performWithDelay( 100, function() -- Put upload code here end )

Hey RoamingGamer, thank you for the reply.

The image does display after being taken as there’s a photo edit section.

I’ve waited up to a minute before submitting the image, still the error response.

I can successfully upload any image that was there before the app started, regardless of the directory or filename. It’s only when it’s created during Runtime does it timeout.

I’m using the most recent Daily Build.

So I figured out that the image being in memory at the time of upload was causing the error.

Strange I think, is this a bug Corona Labs?

I don’t know if it’s a bug or not, but it kinda weird.  Why not go ahead and file a bug report on it.  Make sure to include a sample project, complete with build.settings and config.lua and any assets needed to run the app. Please put it in a .zip file (no other formats please) and use the Report a Bug link at the top of the page.

Thanks

Rob

Suggestion:  Try this experiment.

  1. Save the image like you’re doing now,

  2. Then use the image to create a new object instead of trying to upload it.

If this fails too, then you’ll know you’re not giving enough time for the file to be saved or running to another issue.

In either case, try deferring the upload for a few frames:

-- -- 1. Save -- Code to save image here. -- -- 2. Deferred upload timer.performWithDelay( 100, function() -- Put upload code here end )

Hey RoamingGamer, thank you for the reply.

The image does display after being taken as there’s a photo edit section.

I’ve waited up to a minute before submitting the image, still the error response.

I can successfully upload any image that was there before the app started, regardless of the directory or filename. It’s only when it’s created during Runtime does it timeout.

I’m using the most recent Daily Build.

So I figured out that the image being in memory at the time of upload was causing the error.

Strange I think, is this a bug Corona Labs?

I don’t know if it’s a bug or not, but it kinda weird.  Why not go ahead and file a bug report on it.  Make sure to include a sample project, complete with build.settings and config.lua and any assets needed to run the app. Please put it in a .zip file (no other formats please) and use the Report a Bug link at the top of the page.

Thanks

Rob