Document vs Picture

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
Jaymer
Posts: 2539
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Document vs Picture

Post by Jaymer »

Imagine a Parent BO which will have multiple attachments, like images & PDFs.

If I only had a Document field, I can store images in that as well as a PDF.
Do I really need a separate Picture field for images? (as shown in the Attached pic)
What does a Picture datatype get me that a Document datatype doesn't - and vice versa?

one example: I think if its a Picture, there's a built-in image slider/lightbox thingy that is in the PhotoAlbum sample app... that option is only available for a Picture field.

But if I'm not going to use that, is there any reason to not just have a Document field and store EVERYTHING in there?

J
Screenshot 2024-11-12 at 11.31.31 PM.png
Screenshot 2024-11-12 at 11.31.31 PM.png (13.49 KiB) Viewed 2754 times
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
kklosson
Posts: 1665
Joined: Sun Nov 23, 2008 3:19 pm
Location: Virginia

Re: Document vs Picture

Post by kklosson »

I use both types but always for different purposes. Like you said, I use picture type only when the object needs to be displayed on screen or in a report. I presume the document display function will display an image if needed. So, I use the picture type only if I need the picture to display on screen or in a report without additional user action.
V8.8
MySQL, AWS EC2, S3
PDFtk Toolkit
Heavy on AwareIM Reports
Jaymer
Posts: 2539
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Document vs Picture

Post by Jaymer »

If I need an image on the screen, then BECAUSE I store images/attachments/documents in the FS, I can use HTML with an <img> tag.

What I have not tried is showing a Document type (which is an Image) in a Report... that may be a dealbreaker that would force me to store them separately.

Then, I would have an "Add Image" button and another "Add Document/PDF" button for the user to decide.
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
PointsWell
Posts: 1476
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: Document vs Picture

Post by PointsWell »

Jaymer wrote: Wed Nov 13, 2024 4:37 am But if I'm not going to use that, is there any reason to not just have a Document field and store EVERYTHING in there?
All images are documents but not all documents are images. Does specifying Picture limit what can be stored more easily than the Document attribute? Haven't used so don't know the answer
kklosson
Posts: 1665
Joined: Sun Nov 23, 2008 3:19 pm
Location: Virginia

Re: Document vs Picture

Post by kklosson »

You can certainly display a picture attribute in a report. If it is stored in a document type, then no. I see lots of workarounds. Let's say you want to store everything in a document type. You can have a second attribute to store a picture and an update rule where if the document is .jpg, .png, .gif, etc, then it is exported and loaded into the picture attribute. All depends on your requirements, of course.
V8.8
MySQL, AWS EC2, S3
PDFtk Toolkit
Heavy on AwareIM Reports
Post Reply