apollo-server-react-file-upload's People
Forkers
chewtoys gehtmaguad cctoni bennettluo ramanooo nightthinker jameelio revdfdev 416labs shubh0894 simon-ouyang-tech-work narayansiddhu dutraa mennyg aki323buri2 linda256 radhikavm camanducci roshankr-asort rpdmkr alexisgenton uvindu96 dbrunonascimento rchalla6 lavcodes mauriciocartagena leenorshn harshgupta97 forkses mikecalendo mlevitin-create rommelgoualaapollo-server-react-file-upload's Issues
All uploaded files are empty
Concat links
Hi Ben
Thanks for so many tutorial!
I have created an Apollo Client with JWT from your video https://www.youtube.com/watch?v=25GS0MLT8JU
And I would like to use this upload link, but I'm not sure how to compose links with this and I couldn't find some related practice.
May I know that is this uploadLinks possible to concat links like
const uploadLink = createUploadLink({ uri: MY_GRAPHQL_ENDPOINT })
const client = new ApolloClient({
link: ApolloLink.from([
new TokenRefreshLink({
...),
requestLink,
uploadLink
]),
cache: new InMemoryCache()
})
return client
}
It seems not works as I expected.
I'm new to React and GraphQL so I'm not sure is it proper to inquire this issue here.
If it's not,please tell me and I will delete it immediately.
I appreciate your kindness!
Thank you
Server Error: ENOENT: no such file or directory
Description
Server crashes with Error: ENOENT: no such file or directory, open ...
Steps to reproduce
Reproduce the issue: clone the repository, change directory into the server folder, install dependencies via yarn
and run the app via yarn start
. As soon as the webapp sends an image the server crashes with error: Error: ENOENT: no such file or directory, open ...
Probably opinionated, but it would be nice that server works without manually creating an image directory upfront.
Environment
Ubuntu 18.04.2 LTS
Module not found error when starting webapp
Description
App crashes with Module not found: Can't resolve 'graphql/language/parser'
Steps to reproduce
Reproduce the issue: clone the repository, change directory into the web
folder, install dependencies via yarn
and run the app via yarn start
. This lets the app crash with error: Module not found: Can't resolve 'graphql/language/parser' in ...
The issue seems to be that graphql-tag
has a peer dependency to graphql
, which is not available in the node_modules
folder.
Environment
Ubuntu 18.04.2 LTS
Firebase Console returns broken image
Hi!
First, thanks for your tutorial on Youtube! It was great. Though, I can't seem to fix one problem when using createReadStream
and the bucket storage.
When uploading the image to firebase, the image is broken and I'm not able to preview it in the Firebase Console. All I can see is an error saying Error loading preview. But the filesize, mimetype and accessToken are being uploaded, so i'm doing something right.
Here's the part of my Resolver function where i'm uploading an image:
PS. The bucket comes from an Apollo datasource, that's why I can access it using this
.
const { createReadStream, filename, mimetype } = image;
try {
await new Promise((res, rej) =>
createReadStream()
.pipe(
this.bucket.file(filename).createWriteStream({
resumable: false,
gzip: true,
metadata: {
contentType: mimetype,
metadata: {
firebaseStorageDownloadTokens: uuidv4(),
},
},
})
)
.on("finish", res)
.on("error", rej)
);
return filename;
} catch (err) {
return new Error(err)
}
Do you have any suggestions?
I would really appreciate your help. I've been googling for 2 days now :(
Maximum call stack size exceeded.
Hello Ben!
I have a problem when i run this application. after selecting the image, it says Maximum call stack size exceeded and server crashes.
No createReadStream on file, only path
I'm trying to implement your solution to my project but there is one problem but I'm not sure how to fix it.
I'm using exact same codes as yours but I m only getting
{ path: 'example.jpeg' }
when I try yours you get all options
{ fileName: 'example.jpeg' mimeType: 'image/png' encoding: '7bit' createReadStream: [Function: createReadStream] }
I don't know if its about react or node.
TypeError: Cannot read property 'files' of undefined
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.