Image upload with preview

Former Member
Former Member

I have implemented file uploading as described on this page https://community.telligent.com/community/11/w/developer-training/67228/working-with-user-uploaded-file, for a user to upload an image to be used as avatar.

I was wondering how to display a preview of the image after it's been uploaded. I don't quite get how to show the preview when using Dynamic Configuration or glowUpload.

I also don't get the bit about moving the file to a more permanent location after uploading.



Edited
[edited by: IbrahimK at 8:17 AM (GMT 0) on Sat, Jul 25 2020]
  • I'm not sure about the preview.  But the control uploads the file to a temporary location (based on a context id)  When you process the entire form and commit the save, you read from that temporary location and push it to a file storage location (typically).

  • Former Member
    0 Former Member

    I would look at existing widgets and find one that does something similar and use that for reference.  The blog post create widget has an image upload with a preview.

    There is a discussion of custom file storage providers here.  Basically you will pass in the temporary file storage info when saving, then in C# code save the file to your custom storage provider and save your object with a reference to its permanent location.