Hi
I have set a trigger on my table with the aim of when users upload an image as a blob abd the trigger will resize the image using ords and save it back into the blob
However I am getting the following errors
ORA-00932
inconsistent datatypes: expected UDT glot BLOB
inconsistent datatypes: expected BLOB got ORDSYS.ORDIMAGE
Any ideas if this is even possible, changing the dimensions of the image and saving this smaller file back into the BLOB. The reason being is if a user uploads a picture from a camera and is 5000 x 5000 pixels 6MB I really want his to be 300x400 pixels for when it is shown in the application application and via the website (which is not apex)
CREATE OR REPLACE TRIGGER "SCHEMA"."MYTABLE"
BEFORE INSERT OR UPDATE ON "SCHEMA".MYTABLE
FOR EACH ROW
DECLARE
obj ORDSYS.ORDImage;
BEGIN
SELECT imagedata INTO obj FROM MYTABLE WHERE carerID = :NEW.carerID;
obj.process('maxScale=300,400');
UPDATE MYTABLE SET imagedata = obj WHERE carerID = :NEW.carerID;
END;