I'm working on a project in Salesforce Marketing Cloud and need to create a landing page with an image upload feature. I have already set up a Data Extension named "ImageUploads" with the following fields: ImageBase64, CreatedDate, Id (primary key), and PostText.
I've written a Cloud Page script to handle the image upload, but the uploaded image is not being stored in the Data Extension as expected. Here is a simplified version of my script:
%%[ var @ImageBase64, @PostText, @CreatedDate, @Id set @ImageBase64 = RequestParameter("ImageBase64") set @PostText = RequestParameter("PostText") set @CreatedDate = Now() set @Id = GUID() if not empty(@ImageBase64) then InsertData("ImageUploads", "Id", @Id, "ImageBase64", @ImageBase64, "PostText", @PostText, "CreatedDate", @CreatedDate) endif]%%Despite this, the data is not being inserted into the Data Extension. What might be causing this issue, and how can I ensure that the uploaded image is stored correctly?
Thank you for your help!