It is currently 25 May 2020, 7:42 Advanced search

Set Blob Size

Questions and answers on how to best use Instant Developer

Set Blob Size

Postby Ted Giles » 29 January 2020, 10:47

I looked at the posts regarding this subject and still cannot find out how to use it, and where.
What I need is to automatically download and display a PDF.
The smaller ones - as per the Manual show fine, I just cannot get the syntax correct tp show the larger ones.
User avatar
Ted Giles
 
Posts: 491
Joined: 29 November 2013, 12:58
Location: The Wolds, Lincolnshire, UK

Re: Set Blob Size

Postby ljwilson » 29 January 2020, 13:12

I would set it in the load event of the form.

Look at my old Acme Invoice program. This is the load event for its Manual Upload form:

2020-01-29_8-11-11.jpg
2020-01-29_8-11-11.jpg (74.11 KiB) Viewed 643 times

...jack
ljwilson
 
Posts: 523
Joined: 26 November 2013, 14:15

Re: Set Blob Size

Postby Ted Giles » 29 January 2020, 14:26

I have not looked at the Acme program yet Jack.
This is where I have gotten to.
Added the SetBlobSize but see the small .pdf which won't open

Inde01.PNG
Inde01.PNG (19.86 KiB) Viewed 636 times


EDIT

So now I have confirmed that my code matches Jacks ACME app I am assuming that the PDF I am uploading is the problem. Possibly with hidden chars which prevent it showing correctly. JPG's open immediately - even big ones.
Anyway, my work around is to force a "click to view", which is a pita but useable.

As my company logo says, "If it was easy, anyone could do it!"
User avatar
Ted Giles
 
Posts: 491
Joined: 29 November 2013, 12:58
Location: The Wolds, Lincolnshire, UK

Re: Set Blob Size

Postby lucabaldini » 3 February 2020, 13:28

I don't know if I understood correctly but what I know is that the autoShow size is used only for "image-like" blobs... i.e. files (blobs) which mime type contains the "image" string.

So, if you want to "auto-open" a PDF file you have to include it into an iframe or something... you could use a label field, save the BLOB to disk with a random name, and use that random name into the label's text... something like that:

Code: Select all
   <iframe src="temp/[PDF FILE NAME]"></iframe>
User avatar
lucabaldini
Pro Gamma
Pro Gamma
 
Posts: 4306
Joined: 1 October 2010, 17:03
Location: Bologna

Re: Set Blob Size

Postby lucabaldini » 3 February 2020, 13:29

If that's the case, I would extract the BLOB in the pane's ActiveRow event... Obviously you could use this also for images or anything that can be "auto-shown"...
User avatar
lucabaldini
Pro Gamma
Pro Gamma
 
Posts: 4306
Joined: 1 October 2010, 17:03
Location: Bologna

Re: Set Blob Size

Postby Ted Giles » 3 February 2020, 16:07

Thanks Luca. That explains the issue.
I am pleased that you are still talking to me after Brexit!
User avatar
Ted Giles
 
Posts: 491
Joined: 29 November 2013, 12:58
Location: The Wolds, Lincolnshire, UK

Re: Set Blob Size

Postby lucabaldini » 4 February 2020, 8:51

XDXDXDXD

I'll always talk to you... even if you move to Mars!! :-DDD

Cheers!
User avatar
lucabaldini
Pro Gamma
Pro Gamma
 
Posts: 4306
Joined: 1 October 2010, 17:03
Location: Bologna


Return to Tips & Tricks

Who is online

Users browsing this forum: No registered users and 2 guests