NetTalk Central

Author Topic: Refreshing image display after uploading  (Read 2535 times)

CaseyR

  • Sr. Member
  • ****
  • Posts: 448
    • View Profile
    • Email
Refreshing image display after uploading
« on: July 24, 2015, 05:37:43 PM »
Hi, Bruce

Is there anyway to get an image to refresh after uploading?   Thanks.

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11204
    • View Profile
Re: Refreshing image display after uploading
« Reply #1 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


CaseyR

  • Sr. Member
  • ****
  • Posts: 448
    • View Profile
    • Email
Re: Refreshing image display after uploading
« Reply #2 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.

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11204
    • View Profile
Re: Refreshing image display after uploading
« Reply #3 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

CaseyR

  • Sr. Member
  • ****
  • Posts: 448
    • View Profile
    • Email
Re: Refreshing image display after uploading
« Reply #4 on: July 29, 2015, 09:38:04 AM »
Sounds good.  Talk to you then.