altair
                                
                                 altair copied to clipboard
                                
                                    altair copied to clipboard
                            
                            
                            
                        "copy as curl" does not save the file upload functionality
Describe the bug If you have a mutation that uploads file(s), successfully within Altair when you choose "copy as curl" a curl command line is generated but when you run it in curl it does not upload the files.
To Reproduce Steps to reproduce the behavior:
- Create a graphql service that accepts uploads.
- Create an Altair client mutation, variables and upload file(s)
- Check that it works in Altair, and your server is getting the files.
- click on "Copy to Curl"
- Open an bash window and paste to the command line.
- Observe that the command line contains no references to the upload files that you have set.
- Run the command line and see that your server does not receive any files. Expected behavior I expect the "save as curl" command line should behave exactly as Altair does, if it knows where the files are.
Desktop (please complete the following information):
- OS: Ubuntu hippo 21.04
- Browser chrome Version 91.0.4472.77 (Official Build) (64-bit)
- Platform: Chrome extension and snap
- Version Not sure (about does not work) downloaded yesterday.
Additional context Add any other context about the problem here.
Hey @matthewvcarey1 :wave:,
Thank you for opening an issue. We will get back to you as soon as we can. Also, check out our Open Collective and consider backing us - every little help counts!
👋🏾Thanks for opening your first issue here! Be sure to follow the issue template! ✌🏾
As an aside, I had a look at the packets that altair (using wireshark) is sending when it makes the successful upload of files and the form looks much more like the type of query that postman does rather than the type the playground does and that altair seems to generate on "copy to curl"
Yeah @matthewvcarey1 the "Copy to cURL" doesn't support the file upload functionality. It hasn't been updated, so it will be buggy. Thanks for mentioning it.
I'll be disabling the "Copy to CURL" functionality when using file input, until it is properly updated with support for that.