busboy

XMLHttpRequest.upload.onprogress not Working with HTTPS

纵饮孤独 提交于 2020-08-07 01:27:28
问题 Issue I have a page where users can upload files with the help of FormData and an XMLHttpRequest . Uploading the file works fine. But the upload.onprogress is only working when uploading from an HTTP connection . HTTPS HTTP I've tested this on Heroku and on an Amazon EC2 instance. But it's always the same: Progress is shown when uploading via HTTP Progress event is never triggered when uploading via HTTPS Javascript (Angular 7) const xhr = new XMLHttpRequest(); let progress = 0; /** THIS

XMLHttpRequest.upload.onprogress not Working with HTTPS

时光怂恿深爱的人放手 提交于 2020-08-07 01:26:52
问题 Issue I have a page where users can upload files with the help of FormData and an XMLHttpRequest . Uploading the file works fine. But the upload.onprogress is only working when uploading from an HTTP connection . HTTPS HTTP I've tested this on Heroku and on an Amazon EC2 instance. But it's always the same: Progress is shown when uploading via HTTP Progress event is never triggered when uploading via HTTPS Javascript (Angular 7) const xhr = new XMLHttpRequest(); let progress = 0; /** THIS

Overwrite an existing blob in Azure storage does not work with NODE [closed]

我只是一个虾纸丫 提交于 2020-01-05 07:07:31
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . New question When I overwrite a blob and then update the browser is still caching the main image and not the new one. I have read that there is a cache-control property but I can not implement it. I need to clean the blob cache that has just been uploaded Old question I am trying to overwrite an existing blob

Handling multipart/form-data POST with Express in Cloud Functions

牧云@^-^@ 提交于 2019-12-29 08:42:57
问题 I've been trying to handle POSTs (multipart/form-data) with a Firebase function and Express but it just doesn't work. Tried this in local server and it works just fine. Everything's the same except it's not contained in a Firebase function. Besides screwing up the request object it seems it also screws up the way busboy works. I've tried different solutions presented here but they just don't work. As one user mentions, the callbacks passed to busboy (to be called when a 'field' is found or

Proper way to use connect-multiparty with express.js?

两盒软妹~` 提交于 2019-12-24 00:44:53
问题 I am trying to upload files to my server and extract them from the post request using the connect-multiparty middleware. However, when I receive the request on the server, the req.files and req.body objects are empty (not null, but node-inspector shows that they are Object s with nothing in them. Here is the code that I'm working with: server.js: var express = require( "express" ); var app = express(); var server = require( "http" ).Server( app ); var fs = require( "fs" ); var multipart =

Upload Image from Google Cloud Function to Cloud Storage

♀尐吖头ヾ 提交于 2019-12-23 15:44:11
问题 I'm attempting to handle file uploads using a Google Cloud Function. This function uses Busboy to parse the multipart form data and then upload to Google Cloud Storage. I keep receiving the same error: ERROR: { Error: ENOENT: no such file or directory, open '/tmp/xxx.png' error when triggering the function. The error seems to occur within the finish callback function when storage.bucket.upload(file) attempts to open the file path /tmp/xxx.png . Note that I can't generate a signed upload URL

Streaming an uploaded file to an HTTP request

拜拜、爱过 提交于 2019-12-23 02:38:49
问题 My goal is to accept an uploaded file and stream it to Wistia using the the Wistia Upload API. I need to be able to add fields to the HTTP request, and I don't want the file to touch the disk. I'm using Node, Express, Request, and Busboy. The code below has two console.log statements. The first returns [Error: not implemented] and the second returns [Error: form-data: not implemented] . I'm new to streaming in Node, so I'm probably doing something fundamentally wrong. Any help would be much

Post file from one server to another,using node.js , needle , busboy/multer

巧了我就是萌 提交于 2019-12-20 04:24:41
问题 I would like to move a small image from one server to another (both running node). As I search, I haven't found enough. This post remains unanswered. As I started experimenting I wrote the following to the first server : app.post("/move_img", function(req, res) { console.log("post handled"); fs.readFile(__dirname + "/img_to_move.jpg", function(err, data) { if (err) throw err; console.log(data); needle.post(server2 + "/post_img", { data: data, name : "test.jpg" }, function(result) { console

Node Busboy abort upload

浪子不回头ぞ 提交于 2019-12-18 19:32:44
问题 I'm using busboy, writing my uploaded file to a buffer and performing some validation on it (width, height and filesize). I can't for the life of me figure out how to abort / stop the stream once I find something wrong with the upload. For instance if I have a max filesize of 500kb that I want to allow, I keep track of the size of the buffer as it's uploading and I want to abort if the size is over 500kb. Here's a simplified version of my code. var self = this; var busboy = new Busboy({

Error handling when uploading file using multer with expressjs

你。 提交于 2019-12-18 05:15:35
问题 I am using multer to save the file on server developed through express & nodejs. I am usign following code. var express = require('express'), multer = require('multer') var app = express() app.get('/', function(req, res){ res.send('hello world'); }); app.post('/upload',[ multer({ dest: './uploads/'}), function(req, res){ res.status(204).end() }]); app.listen(3000); Multer saves the file for me in the specified destination folder. All this is working fine but I have following questions: If the