STORING IMAGE IN FILE SYSTEM, build 8.1 2477
When I create a new BO, I need a user to fill in 4 images.
I'm using Mobile (but thats not the issue) - point is, don't try and change what I'm doing - same thing happens on desktop.
When I create the parent record, I'm creating 6 records in a child table.
I pre-name the images "front, rear, left, right" so the user knows which image to put into each record - its to prompt him.
You can see the default image thats assigned here:
Each record points to that "tap here.png" physical file.
PROBLEM IS that when I tap on the thumbnail and it goes to the Edit form where I can Select a File to upload, Aware DELETES the "tap here.png" file and then uploads the user's image - a RULE kicks in to MAKE DIRECTORY if its not found, and set the path to store this uploaded doc.
Obviously, I can't have my default image disappear.
At create time, instead of setting an Initial value to point to my 'tap here' file, I guess I could copy that 6 times into the images directory for this Parent, but that seems overkill - its only a 2k file though so it wouldn't be that terrible.
Am I missing something with the way Aware handle's these images?
Is there another strategy to point to a common image file and not have it be deleted?
thx
jaymer...
PS _ here's a completed image on a phone screen with 6 images uploaded.
[SOLVED] My default Image is getting deleted.
[SOLVED] My default Image is getting deleted.
Last edited by Jaymer on Thu Nov 29, 2018 9:22 pm, edited 1 time in total.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL
Re: My default Image is getting deleted. I'm missing somethi
My solution was to use CSS.
1) In the Custom Query Template:
<div class="pic-group">
<div class="pic-heading">{PicSection}</div>
# if(data["PicImage"] != undefined) { # <div class="pic-image">{PicImage}</div> #} #
# if(data["PicImage"] == undefined) { # <div class="pic-missing"> </div> #} #
</div>
2) CSS
.pic-missing {
margin: 3px;
box-sizing: content-box;
width: 160px;
height: 160px;
border: none;
text-overflow: ellipsis;
background-repeat: no-repeat;
background-image: url("../../../images/AssignImage.png");
background-size: 160px 160px;
}
3) Result:
1) In the Custom Query Template:
<div class="pic-group">
<div class="pic-heading">{PicSection}</div>
# if(data["PicImage"] != undefined) { # <div class="pic-image">{PicImage}</div> #} #
# if(data["PicImage"] == undefined) { # <div class="pic-missing"> </div> #} #
</div>
2) CSS
.pic-missing {
margin: 3px;
box-sizing: content-box;
width: 160px;
height: 160px;
border: none;
text-overflow: ellipsis;
background-repeat: no-repeat;
background-image: url("../../../images/AssignImage.png");
background-size: 160px 160px;
}
3) Result:
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL