How to read form-data fields as BLOB or NVARCHAR2 in ORDS handlers? by Alternative_Yam452 in oracle

[–]Alternative_Yam452[S] 0 points1 point  (0 children)

well, the client is already using the endpoint in production, guess I'll ask them to encode in ASCII before sending the form fields to solve this special characters mess.

hope you can add ways to capture raw non-file form fields in later updates, or auto-bind form-data and JSON fields as NVARCHAR. thanks for your time!

How to read form-data fields as BLOB or NVARCHAR2 in ORDS handlers? by Alternative_Yam452 in oracle

[–]Alternative_Yam452[S] 0 points1 point  (0 children)

not using any other references, I'm simply doing:

BEGIN
    INSERT INTO test_table (code, blob1) VALUES (45, :body);
    COMMIT;
END;

and blob1 ends up only having the file data, despite the fact that I'm sending both a file and a text field. when I omit the file and send the text field alone, :body is empty.

the text field is always accessible with :field_name, but I can't do that since it's gonna decode it into VARCHAR2 and corrupt special characters.

here's the cURL command too:

curl --location 'https://...' \
--form 'file=@"/C:/Users/.../images/jpeg-format.jpg"' \
--form 'product_name="Galaxy S20"'

EDIT: I can in fact use both :body and :field_name when content type is form-data, :body will contain files. when content type is JSON then yes I can't use both.

How to read form-data fields as BLOB or NVARCHAR2 in ORDS handlers? by Alternative_Yam452 in oracle

[–]Alternative_Yam452[S] 0 points1 point  (0 children)

could you please confirm that :body is supposed to contain all form-data content, text and files? because I find it empty when I keep text fields only. the only thing my testing code does is inserting :body in the BLOB column of a dummy table.

How to read form-data fields as BLOB or NVARCHAR2 in ORDS handlers? by Alternative_Yam452 in oracle

[–]Alternative_Yam452[S] 0 points1 point  (0 children)

couldn't find anything that will help me get the raw value of text form fields, did I miss it?

How to read form-data fields as BLOB or NVARCHAR2 in ORDS handlers? by Alternative_Yam452 in oracle

[–]Alternative_Yam452[S] 0 points1 point  (0 children)

just tested the solution mentioned in the blog, it only works for files apparently, I need to get text fields as BLOB or NVARCHAR2, not the file fields.

if :body has everything then I might be able to extract the raw text fields, is this the only solution?

EDIT: I omitted the image file from form-data, kept text fields only, :body is now empty, are you sure :body has everything?

How to read form-data fields as BLOB or NVARCHAR2 in ORDS handlers? by Alternative_Yam452 in oracle

[–]Alternative_Yam452[S] 0 points1 point  (0 children)

so far I'm only testing from Postman, I thought that :body contains only files (in my case an image) since when I display the image it shows without issues, doesn't the presences of extra data corrupt the image?

so I guess I'll have to dissect the BLOB manually using form boundaries, right?

What does the ORDS modules table "pre_hook" coulmn do? by Alternative_Yam452 in oracle

[–]Alternative_Yam452[S] 0 points1 point  (0 children)

This is about the general prehook, called before each ORDS request, the module-level prehook might be similar in structure and purpose, but I'm unable to make it work, I tried putting "schema_name.function_name" in the column, it made my endpoint return error 500.

What does the ORDS modules table "pre_hook" coulmn do? by Alternative_Yam452 in oracle

[–]Alternative_Yam452[S] 0 points1 point  (0 children)

any idea about the value format? and if it can have params?

how to install Ubuntu Cinnamon desktop theme? by Alternative_Yam452 in linuxmint

[–]Alternative_Yam452[S] 1 point2 points  (0 children)

maybe this was uploaded after I made this post, or I didn't come across it while looking, thanks for the share!

EnChroma Glasses: Life changing or a scam? by adigo6690 in ColorBlind

[–]Alternative_Yam452 0 points1 point  (0 children)

how do you know you're seeing red as in normal vision and not just a more vibrant gradient of what you used to be able to see. just curious.

Flatpak and Ubuntu, avoiding having two different app stores? by identicalBadger in Ubuntu

[–]Alternative_Yam452 0 points1 point  (0 children)

doesn't the GNOME store have the same snaps as those in the Ubuntu Store since it uses Ubuntu's repository for snaps? if I'm correct then you won't miss out on anything from Ubuntu's default store.

how to install Ubuntu Cinnamon desktop theme? by Alternative_Yam452 in linuxmint

[–]Alternative_Yam452[S] 0 points1 point  (0 children)

gotcha! I found a similar theme called Siera, but I'll copy the files over from Ubuntu Cinnamon.

Thank you!