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.

uploadFrom not working with blob urls?

See original GitHub issue

uploadFrom keeps adding my MERN project directory (C:\node\project\) to the url

//file parameter equals = blob:http:\\localhost:3000\\3e7136f8-47ac-4e84-a380-49a24dc92931
await client.uploadFrom(fs.createReadStream(file), "project/img.png")

Error thrown:

[0] > EPSV
[0] [Error: ENOENT: no such file or directory, open 'C:\node\project\blob:http:\localhost:3000\3e7136f8-47ac-4e84-a380-49a24dc92931'] {
[0]   errno: -4058,
[0]   code: 'ENOENT',
[0]   syscall: 'open',
[0]   path: 'C:\\node\\project\\blob:http:\\localhost:3000\\3e7136f8-47ac-4e84-a380-49a24dc92931'
[0] }

I tried uploadFrom(file, …) too, same error, also tried doing a simple ftp upload with a txt file manually added to the project folder, it works. Thanks !

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
laazazcommented, Feb 23, 2021

@jayanthsaikiran points to the reader inside the “onload” method, https://developer.mozilla.org/en-US/docs/Web/API/FileReader you shouldn’t touch it, also for drag and drop, simply change the last line to:

reader.readAsArrayBuffer(files[0]);

1reaction
laazazcommented, Jan 31, 2021

Thanks for the answer, what I actually want is to simply upload file from the to my ftp server, but I have no idea how to do it, I’ve tried a lot of things, also didn’t find any docs on them (not saying they arent on docs) if you give a link please? that would be very kind.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Upload file from browser blob url? · Issue #403
The workaround I found was passing the image encoded in Base64. So I assume there's some kind of problem with the encoding. 2...
Read more >
how to get blob-URL after file upload in azure
Assuming you're uploading the blobs into blob storage using .Net storage client library by creating an instance of CloudBlockBlob , you can ...
Read more >
Upload file directly to Azure Blob Storage from URL with ...
I'm trying to upload file to Blob storage from the URL: ... but it's not clear of dealing with URL. There was an...
Read more >
It's possible to upload from javascript using URL
Hello, I'm trying to upload a file to my Dropbox account through javascript. Actually, I've been using this: var dbx = new Dropbox....
Read more >
Upload files with Cloud Storage on Web - Firebase
Upload from a String. If a Blob , File , or Uint8Array isn't available, you can use the uploadString ...
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