We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can you provide examples of uploading files? I cannot integrate the upload of files.
import GraphQLUpload from "graphql-upload/GraphQLUpload.mjs"; import type FileUpload from "graphql-upload/processRequest.mjs"; or import { FileUpload, GraphQLUpload } from '@nestjs/graphql'; @Mutation(() => String) async uploadFile( @Args({ name: 'file', type: () => GraphQLUpload }) { createReadStream, filename }: FileUpload ): Promise<string> { const uploadDir = join(process.cwd(), 'uploads'); await mkdirp(uploadDir); const filePath = join(uploadDir, filename); const readStream = createReadStream(); const writeStream = createWriteStream(filePath); await pump(readStream, writeStream); return `File saved to: ${filePath}`; }
I hope to come up with a case study
jaydenseric/graphql-upload#391 (comment)
This brother doesn't quite understand what I mean
...
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Is there an existing issue that is already proposing this?
Is your feature request related to a problem? Please describe it
Can you provide examples of uploading files? I cannot integrate the upload of files.
Describe the solution you'd like
I hope to come up with a case study
Teachability, documentation, adoption, migration strategy
jaydenseric/graphql-upload#391 (comment)
This brother doesn't quite understand what I mean
What is the motivation / use case for changing the behavior?
...
The text was updated successfully, but these errors were encountered: