-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Conversation
@mxstbr would love your help on something here: for some reason media images are being rendered twice in chat (optimistic update + server response). I've spent quite a while this evening trying to debug in the Otherwise, would love your eye on everything else:
One thing I need feedback on:
|
Also note the fs stuff is coming from the example here: https://github.com/jaydenseric/apollo-upload-examples/blob/master/api/resolvers.mjs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to use a temporary /uploads directory to generate a filepath on the server that can then be uploaded to s3. I made it so that these uploads get deleted immediately after being uploaded, but I could see any errors here leading to a buildup of files and a possible mem/storage leak?
Nice idea in theory. Unfortunately, now
doesn't let us access the file system—if you run this code in prod it'll just crash and/or do nothing. How else can we work around that?
Other than not-using-the-file-system this LG |
God damnit. I think |
The s3-image-uploader module doesn't do what we need it to as it can't handle file streams. The AWS SDK can handle them though, so this patch switches us to using that directly. Also removes all that fs code. /cc @brianlovin
The s3-image-uploader module doesn't do what we need it to as it can't handle file streams. The AWS SDK can handle them though, so this patch switches us to using that directly and it's working perfectly. I'm trying to repro that optimistic response bug now! |
New dependencies added: aws-sdkAuthor: Amazon Web Services Description: AWS SDK for JavaScript Homepage: https://github.com/aws/aws-sdk-js
|
Created | about 6 years ago |
Last Updated | about 6 hours ago |
License | MIT |
Maintainers | 2 |
Releases | 23 |
Keywords | short, tiny, id, uuid, bitly, shorten, mongoid, shortid and tinyid |
Generated by 🚫 dangerJS
Can repro that double-images bug, on it. |
I investigated that double-images bug but there's just no way for us to map the local optimistic message to the remote URL. 😕 Any ideas how to fix that? |
I have no idea :/ I wish Apollo made this a bit smarter, right? Only thing I can think is to not show an optimistic message at all and just show a loading spinner somewhere while the image uploads, so that when the image appears its a server-saved image. |
… upgrade-image-uploads
Deploy after merge (delete what needn't be deployed)
Release notes