Codeless: Upload File Block - Data in which format?

Hi all,
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?
Renato
http://support.backendless.com/public/attachments/21d1489092f4ac7ef46db89859208e67.png</img>

21d1489092f4ac7ef46db89859208e67.png

Hi Renato

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

Regards Anton

Hi Renato

We’ve fixed the “Create File” block, and released the changes.

Regards, Vlad

Hi Vlad,

Thanks!

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”?

Renato

Hi Renato,

We’ve improved the block, and will release it asap

You can create file from:

http://support.backendless.com/public/attachments/0a6c810c16f618dafd90337ba4be016f.png</img>

http://support.backendless.com/public/attachments/ba6ebb8775a81dc18ceece3958e359dd.png</img>

http://support.backendless.com/public/attachments/27e50924bc947b94997dc383962b7701.png</img>

Regards, Vlad

b17def7e0989153decc7c6f4bfd45ec5.png

0a6c810c16f618dafd90337ba4be016f.png

ba6ebb8775a81dc18ceece3958e359dd.png

27e50924bc947b94997dc383962b7701.png

Thanks Vlad, that is fantastic! I will wait until the next release to give it a go!

Renato

Hi guys, just wondering if there is an ETA for the next release?

Hi Renato,

It should be early next week.

Regards,
Mark

Thanks Mark!

Hi Renato

We’ve released the changes, please check this out

Regards, Vlad

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.

Thanks,

Renato

Screen Shot 2017-09-02 at 5.13.13 PM.png

Screen Shot 2017-09-02 at 5.11.06 PM.png

Hi Renato

Sorry for the delay,
Do you still have the problems, if so, please provide your appId I’ll try to investigate it.

Regards, Vlad

Hi Vlad,

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.

Thanks,

Renato

Missed blocks - please check this out, it should be fixed

textToTitleCase - has been fixed and you can get the changes with the next release