Base64toFile - Custom Module - NodeJS

Hi there fellow Wapplers,

Another simple extension. This enables you to easily decode a base64 string to a file using fs.

bvase64tofile.zip (1012 Bytes)
Happy Wapplering!

bg

Jelle

edit: added parse to enable data picking

1 Like

Hi Jelle,

I’m trying to use your module, the file is saving but it doesn’t open / work.

I’m sending a base64 string like this:

data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJ4AAACeCAYAAADDhbN7AAAKqmlDQ1BJQ0MgUHJvZmlsZQAASImVlwdQU+kWgP970xstIQJSQm+CdAJICaEFUJAOohKSAKGEGAgKYkMWV2BFEREBG7oqoOCK0uyIYmERsGBfkEVFWRcLNlTeBYawu2/ee/POzJnz3XPPf875/7n/zLkAUBS4YnEyrABAiihdEuTtzoiIjGLgngESUARkgAeOXF6amBUY6A8QmbF/lw93ATRpb5lN5vr39/9VFPmCNB4AUCDCsfw0XgrCJxF9yRNL0gFA7UP8uivTxZPcjjBNgjSI8L1Jjp/mkUmOnWI0mIoJCWIjTAMAT+ZyJfEAkBmIn5HBi0fykN0QthDxhSKExQi7pKSk8hE+jrAREoP4yJP5mbF/yRP/t5yxspxcbryMp/cyJXgPYZo4mZv5fx7H/5aUZOlMDQNEyQkSnyDEKiFndi8p1U/GothFATMs5E/FT3GC1Cd0hnlp7KgZ5nM9/GRrkxf5z3Cc0Isjy5POCZlhQZpn8AxLUoNkteIkbNYMcyWzdaVJoTJ/goAjy5+VEBI+wxnCsEUznJYU7Dcbw5b5JdIgWf8Ckbf7bF0v2d5T0v6yXyFHtjY9IcRHtnfubP8CEWs2Z1qErDe+wMNzNiZUFi9Od5fVEicHyuIFyd4yf1pGsGxtOvJBzq4NlJ1hItc3cIYBG6SCZEQlgAH8kScPANIFq9InN8JOFWdKhPEJ6QwWcsMEDI6IZz6PYWVhZQXA5H2d/hze0afuIUS/PuvLaQHAmTMxMXFm1ud3GoCGQgCIfbM+o1gA5OcBcLWcJ5VkTPum7hIGEIE8oAFVoAl0gREwA1bADjgBN+AJfEEACAGRY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ZanJeAU0G1RhxNpljjYFDeQNXNv0mCRycMySpOEnFavFX/iCaianXbgBqDsxNibpcg96YTH5hCD3ur/G4rafxYfJbz792ec65e7XJ2kFogyzYKQ3uGPWy9SEu/U2a+XbKQN4w0J8aU13miSFsbOq6dubovKrVRIB/kCu17YOpE4dLyC0ePuLr4TkkOPfaP97FBmeC5Z218XlXW1+VuQaeRxFPk5t4JDeS8KPXjVS3xKsN4mu9X7v0xmV35zwco6naLUGwW9w5beAcZ5B+bnwwMnGhHTLOGMYnO6QjK9i4rrOeR35ha66ZRKxHO7IImjUVKaq2deKxBNZU3qR3rtYCjG65ALRdNSqfU9bJqPUAs3nKaY7UN/b/ASzfluWIUXoAAAAAAElFTkSuQmCC

It’s saving the file but it seems to be corrupted?

Screenshot 2022-11-24 at 13.51.01

When checking the base64 string in for example https://codebeautify.org/base64-to-image-converter, it converts it without a problem so I don’t think that the string I’m sending has a problem

Any tips on how to use it correctly?

Nevermind, had to remove the “data:image/png;base64,” header, works now.

Thanks for the module!

1 Like

Great to hear you got it working :ok_hand:

1 Like