I am trying to create a file in one of my codeless API functions, and noticed that the create file block expects the “file content” parameter to be a string.
My question is in what format is the file system expecting this string to be? Base64?
This parameter is corresponding to the third parameter in the saveFile method which is expected to be a byte array. But currently the value will be cast to the method as String. This is unexpected behavior and the block will not work. I’ve opened internal ticket to fix this issue. We’ll report back soon when issue will be fixed. Thanks for reporting
We’ve fixed the “Create File” block, and released the changes.
Quick question - how do I use it? On the surface, the block seems to still be wanting a string … how do I pass data into it?
Also with that, what datatype should I be using (when defining type on a service method)? String, Array, “Any Object”?
Thanks Vlad, that is fantastic! I will wait until the next release to give it a go!
Hi guys, just wondering if there is an ETA for the next release?
It should be early next week.
We’ve released the changes, please check this out
Hi Vlad, looks to be good - I was able to create a file with a base64 string.
However, a bunch of my blocks were missing and forced me to re-create them. This is probably to be expected with the create file block, but some other simpler blocks (like the create string block) were missing. Is this to be expected when there are changes?
Not sure if its related to recent changes, but I also now get a bunch of errors when simply opening one of my services:
"Cannot read property 'x' of undefined"
In one case, there seems to be an issue around the “to title case” block and the associated code that’s generated.
Another is “getName” … which I’m sure is not a function I created, and doesn’t even appear in the code window of the service that the error came up on.
I’ve attached screenshots.
Sorry for the delay,
Do you still have the problems, if so, please provide your appId I’ll try to investigate it.
Still seems to be some odd errors going on. App ID is A324EB2B-1BF5-EB0A-FF36-62F47D198E00, and I seem to keep seeing the inconsistencies when opening service methods in the “Registration Service” codeless svc/model.
Missed blocks - please check this out, it should be fixed
textToTitleCase - has been fixed and you can get the changes with the next release