-
-
Notifications
You must be signed in to change notification settings - Fork 16.3k
New issue
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
[feature] send blob response #5139
Conversation
Hi @dougwilson and @abenhamdine just made some changes please verify |
hi @dougwilson , is this PR need any further improvements or is anything still pending from the end to complete this ? |
hi @dougwilson, as you can see that all the test cases have been passed so can we merge this now? |
Hi @dougwilson, I think all issues reported by you are resolved. hope to merge this soon. Thank you!! |
Hi @dougwilson, can you please re-run the GitHub action? Thank you !! |
@dougwilson is there any issues which is still there in this PR? |
@dougwilson just to remind you about this. |
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 see that your code populates Content-Length
in the switch/case
where the type is set for all types of arguments and you skip the populate Content-Length blocks. This means that ETag will never be set. I assume that this is on purpose, because the etag
package does not work with Blob
s and File
s.
Maybe it would be worth considering adding support for Blob
/File
to etag
first?
The problem is that the crypto.Hash
API requires a string
, Buffer
, TypedArray
or DataView
and that would require calling blob.arrayBuffer()
, which copies the data (and is asynchronous). For File
s, however, a tag based on size
and lastModified
could be used like for regular files.
Also, your code formatting is inconsistent (sometimes lacking spaces between if
and (
or )
and {
; semicolons are used most of the time, but not always), but this is just nitpicking, especially since the existing code does not adhere to the JavaScript Standard Style (required by the Express Collaborator Guide) either.
Hi @krzysdz, I don't find any lint issue or something like that on this particular piece of code that I have written here by running |
Hi @dougwilson @krzysdz and Team |
As for the code style, |
Hi @dougwilson, can you please give some time to this PR? |
@dougwilson Ping |
@UlisesGascon , Could you please review this pull request and merge it if everything looks good? If there are any areas that need improvement, could you let me know? |
This is a long thread (mostly with the OP spamming 😭, please stop spamming maintainers), AFAICT the comment with the most context is from @jimmywarting which seems to me to conclude that this feature is not really necessary for anything other than in node 14. Unless anyone else can summarize it in a digestible way with a clear argument in favor of adding support for this I am a 👎 on landing this. |
Hi @dougwilson and Team
I hope this improves the feature of express 🚀🚀
This PR is related to #4807
res.send(blob)
Blob
ObjectThank you 😊