#NeatFastro - Error
1 messages ยท Page 1 of 1 (latest)
you can take a peek at the thread I mentioned but here's the summary:
I wan't to upload files to stripe using flutter app
the stripe flutter sdk does not has file upload functionality yet
The thread is showing as "cannot be loaded"
so my best bet is to either use the nodejs sdk or use the http api
I wasn't able to make the nodejs work as well
but the api is also throwing an error (see the screenshot)
you should contact with discord's support
Yeah, we do ๐
Okay can you share a request ID for one of the failed curl requests?
Your syntax looks pretty spot on with this: https://stripe.com/docs/api/files/create?lang=curl
Although file uploads via cURL are problematic
The file path is being passed as a string, that's the problem
also what's the matter of @ symbol in the docs?
I think if you don't put the @ then it will treat what you put there as a normal string but this could also depend on what version of bash or zsh you us
Which is one more reason not to use curl
It's not like I want to... I don't have a choice
also the actual app will have to somehow provide the bytes data
You really should be uploading from your server, it's more secure and you can use the Stripe NodeJS SDK
Well not more secure
but we don't have any support for it
Step 1 - try doing this in the browser rather than curl
worked in the browser
Alright, well there we go. It's easier to send multi-part form data in the browser than configuring it via curl
ok but one problem, I can't see the log in the stripe dashboard, I did changed the publishable_key of the linked code you sent
not sure what you mean
was the file uploaded? Can you retrieve via the API? If so it's working right?
I can't see the logs for the request
do you have the file id?
yep I do, but when I tried to retrieve the file using cURL... well see the screenShot
file_1Kw8ns2eZvKYlo2CgctNZlgm
that was created with the wrong API key
that's Stripe's default key, not your own key/account
I did changed the key
you can see in the screenshot (just below the terminal window)
you didn't though
Ok my bad, I needed to press cmd + s after replacing the key to make it work
or you didn't reload the page and such yeah
it's just a simple jsfiddle example, for your to then write your own code/file upload
I understan...
but really I'm of the same opinion as @stray fog here, the easiest is for you to upload the file to your server (which as a developer you would be familiar with) and then you upload from the server
Is there by any chance a way to upload the file to stripe by proving file bytes data instead of file path?
OK ๐
Is there by any chance a way to upload the file to stripe by proving file bytes data instead of file path?
yeah I think you're really confused here
the file name with the @ is purely "curl in the terminal" hack, nothing to do with how the upload really happens
that's why we keep saying "don't use curl"
at the end of the day, the file upload to our API uses multi part form upload, like any browser file upload