Announcement

Collapse
No announcement yet.

Assigning a GUID as the incoming Photo Filename in a Field of type Image (Filename)

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Assigning a GUID as the incoming Photo Filename in a Field of type Image (Filename)

    I was able to get my file upload working, so that my users can upload a profile photo. However, I'm wondering what will happen if two users upload a file with the same file name? Since all photo files are going to the same folder, there is a good chance that two users will upload a file with the same file name. I noticed that if I click "Save" more than once, the file in the folder will get a (1) tacked onto it. I'm assuming that this is what would happen if an incoming file had the same name as an existing file name.

    I want my file name to match the record's primary key GUID of my DB table. Is there a way to intercept the file upload, so that I can tell the SC app to use my GUID (a varchar(36)) .jpg (or .png) instead of the original file name?

    This would make it unnecessary to put (1) 's after duplicates. Other apps that access the table could just grab the primary key GUID and know that the image file with that same GUID is the one it wants.

Working...
X