Mobile app upload image size control

Mobile app upload image size control

  

Hi,

I'm using upload widget for mobile app and it is working fine most of the time but sometimes I have timeouts.. I think it might be related to uploaded image size.. Are there any control over what size is uploaded to the server or there is default value somewhere? 

Thank you.


Hi Mykola,

If you're getting timeouts uploading a file the most probable cause is the network latency which out of control of the platform.

Hi João,

Ok... I will try with another network.

But still - are there any controls for image size or what size is default or it is upload original images? 

I don't need full sized images in my app for example so was looking for built-in image size settings.

Hi Mykola,

You can use JavaScript to check the image size on the client before trying to upload. In your "save" client action drop a JavaScript node and add one input parameter (the id of the Upload widget) and one output parameter (the file size). The code would be something like this:

$parameters.fileSize = document.getElementById($parameters.FileInputId).firstChild.files[0].size;

Notice that you have to use "firstChild" because the element identified by the widget id is actually a label that wraps the "file" input.