-
Notifications
You must be signed in to change notification settings - Fork 49
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
Support for multi-part file uploads #8
Comments
It seems like the issue might be caused from |
@techniq did you found a workaround? Feel free to submit a PR |
I did not, but haven't looked into it in a while. I also haven't tried since the new functions runtime came out. This might be related to the issue as well - Azure/azure-functions-host#1361 |
Also related
This is currently low priority on my list of things at the moment. This initially came up when I was experimenting with the Functions platform. I've already been switching a lot of my development over to C# in some cases. |
@techniq do you think if we return the raw See in OutgoingMessage.js: /**
* @param {Object|string|Buffer} body Express/connect body object
* @param {string} encoding
* @returns {Object|string} Azure Function body
*/
function convertToBody(body, encoding) {
// This may be removed on Azure Function native support for Buffer
// https://github.com/Azure/azure-webjobs-sdk-script/issues/814
// https://github.com/Azure/azure-webjobs-sdk-script/pull/781
return Buffer.isBuffer(body)
? body.toString(encoding)
: body;
} Related to Azure/azure-functions-host#814 and Azure/azure-functions-host#781 |
Hey guys, I was having the same issue. Looks like it's a problem between the structure of the Express Request object vs. the Azure Context Request object. It looks like one of those is not being treated as a Buffer, but I can elaborate more on the issue, since I saw this discussion somewhere else. I'll try to find the link for that discussion. As a alternative, I've been uploading files transforming them to Base64 and sending then via Form Data |
Can we now use multer as normal ? |
no, multer is still not working with this |
From my observations with current state of azure functions (v2) for js it might be pointless to invest in support of this. All requests come via starter function which only gets triggered once entire request was loaded. At this point there is no streaming, if uploaded files made it to your starter function you can use something like https://www.npmjs.com/package/multipart-formdata to parse uploaded files. You can get boundary from |
Is multi-part in Azure Functions (for Javascript) still unsupported? |
@yvele it appears you are busy, but some feedback on this would be greatly appreciated. I opted to use this library, and this is really killing me. It appears there is a PR in place to deal with the |
Have you tested multi-part file uploads with this adapter? All attempts I've tried thus far cause the web request via postman to not respond and usually timeout after 5 minutes. I also usually see this log in the function portal editor:
I've tried using the multer middleware with both it's memory storage as well as multer-azure to attempt to store uploads into azure blob storage.
I've also tried using busboy directly with
req.pipe(busboy)
to no avail.It's likely there is a problem with my code (and I can give some examples of what I'm trying per the above) but wanted to verify if it should work before I spend too much more time on it.
Thanks.
The text was updated successfully, but these errors were encountered: