Home » Developer & Programmer » Forms » Getting size of image in forms 6i (Forms 6i)
Getting size of image in forms 6i [message #584725] Fri, 17 May 2013 02:39 Go to next message
dev_777
Messages: 30
Registered: June 2010
Member
I have a form that loads an image. Before storing the image on the database, I want to verify the size of the image. If the image is 0kb, I want to pop up a warning message and fail the load into the database.

I am using Forms 6i Version 6.0.8.23.2
Re: Getting size of image in forms 6i [message #584782 is a reply to message #584725] Fri, 17 May 2013 11:09 Go to previous messageGo to next message
Littlefoot
Messages: 19536
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Research use of UTL_FILE, especially its FGETATTR procedure & its FILE_LENGTH parameter.
Re: Getting size of image in forms 6i [message #584860 is a reply to message #584782] Mon, 20 May 2013 00:58 Go to previous messageGo to next message
dev_777
Messages: 30
Registered: June 2010
Member
We are using database 8i. FGETATTR is not available on 8i.
Re: Getting size of image in forms 6i [message #584861 is a reply to message #584860] Mon, 20 May 2013 01:18 Go to previous messageGo to next message
Littlefoot
Messages: 19536
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Then try with GET_LINE. If it gets nothing, then the file is empty.
Re: Getting size of image in forms 6i [message #584873 is a reply to message #584861] Mon, 20 May 2013 02:26 Go to previous messageGo to next message
dev_777
Messages: 30
Registered: June 2010
Member
I would have to use UTL_FILE.FOPEN first before using UTL_FILE.GET_LINE.

I want to do the file size check at form level ie. image is loaded into the form using READ_IMAGE_FILE. I doubt UTL_FILE.GET_LINE would work as I would have to assign the directory path where the image is stored.
Re: Getting size of image in forms 6i [message #584875 is a reply to message #584873] Mon, 20 May 2013 02:43 Go to previous message
Littlefoot
Messages: 19536
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Yes and yes.

If you don't want/can't do that, see whether Webutil helps. I don't use it, so I can't assist.
Previous Topic: PLSQL TABLE
Next Topic: update record
Goto Forum:
  


Current Time: Mon Sep 01 15:08:53 CDT 2014

Total time taken to generate the page: 0.10063 seconds