question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for multi-part file uploads

See original GitHub issue

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:

2017-06-21T05:04:30.644 Microsoft.Azure.WebJobs.Host: Timeout value of 00:05:00 was exceeded by function: Functions.FileUpload.

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.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:2
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
techniqcommented, Jun 21, 2017

It seems like the issue might be caused from azure-function-express’s IncomingMessage only being an EventEmitter and not a stream like express/node’s IncomingMessage.

1reaction
yvelecommented, Oct 18, 2017

@techniq do you think if we return the raw Buffer that may helps?

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 https://github.com/Azure/azure-webjobs-sdk-script/issues/814 and https://github.com/Azure/azure-webjobs-sdk-script/pull/781

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting Started | Uploading Files - Spring
Uploading Files. This guide walks you through the process of creating a server application that can receive HTTP multi-part file uploads.
Read more >
Uploading and copying objects using multipart upload
Multipart upload allows you to upload a single object as a set of parts. Each part is a contiguous portion of the object's...
Read more >
File Upload with Spring MVC - Baeldung
In this article, we focus multipart (file upload) support in Spring MVC web applications.
Read more >
Spring Boot File upload example with Multipart File - BezKoder
In this tutorial, I will show you how to upload and download files with a Spring Boot Rest APIs to/from a static folder....
Read more >
How to Multipart File Upload Using FormData with HTML | refine
What is Multipart Upload Request?​ ... A multipart request is a HTTP request that HTTP clients construct to send files and data over...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found