NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: CaseyR on July 24, 2015, 05:37:43 PM

Title: Refreshing image display after uploading
Post by: CaseyR on July 24, 2015, 05:37:43 PM
Hi, Bruce

Is there anyway to get an image to refresh after uploading?   Thanks.
Title: Re: Refreshing image display after uploading
Post by: Bruce on July 27, 2015, 01:10:00 AM
Hi Casey,

so think of this as 2 separate form fields.
a) the upload field
b) the image field.

As with all field types, if you want to refresh one field when another field changes then you can do that on the Client-Side tab for the File Upload field.

cheers
Bruce

Title: Re: Refreshing image display after uploading
Post by: CaseyR on July 28, 2015, 07:58:32 PM
Hi,

I was a little too brief in my question.

What you described is what I tried initially, but with both my app and the FileUpload example app it doesn't display the image on uploading.   The problem, from what I can tell, is that when the file is uploaded the string field that identifies the image file is initially set to the full pathname which can't be displayed because it is not safe.   It is only when the field is validated before saving to disk that the path is truncated to just the uploads folder and so can be displayed.  I just wanted to confirm there wasn't some in built feature that could do the truncating on upload before the display field is refreshed before trying to come up with a solution.   I will post anything I come up with.
Title: Re: Refreshing image display after uploading
Post by: Bruce on July 28, 2015, 11:10:08 PM
Hi Casey,

I think we should discuss this during the webinar. There might be a tweak needed, but there's no reason the image can't refresh after upload.

cheers
Bruce
Title: Re: Refreshing image display after uploading
Post by: CaseyR on July 29, 2015, 09:38:04 AM
Sounds good.  Talk to you then.