Code Monkey home page Code Monkey logo

Comments (8)

haadcode avatar haadcode commented on July 21, 2024

Fiiiiine! 😄

Here's a work-in-progress PR #16. Seems to work but more testing is needed. It's been in the works for weeks, just haven't had the time to work on it actively, slowly getting there though.

@diasdavid wanna give it a spin and report back any problem?

from orbit-web.

haadcode avatar haadcode commented on July 21, 2024

Test version here: https://ipfs.io/ipfs/QmNzQaPoK9gmq9du6R3KcGNJRKvkjuf7MpgYV5qFVr16gt.

from orbit-web.

daviddias avatar daviddias commented on July 21, 2024

Wooooot! :D Just tested it. Chat seems fine, had two issues with images:

  • drag and drop didn't work
  • open after upload as attachment didn't work

image

from orbit-web.

daviddias avatar daviddias commented on July 21, 2024

Works on Safari mobile too \o/

image

from orbit-web.

haadcode avatar haadcode commented on July 21, 2024

Thanks @diasdavid for testing it! ❤️❤️ Any notes on connectivity or performance?

Will take a look at the file upload and drag & drop issues when I can. Anyone stumbling here and feeling like helping, figuring out the problems ^ would help a lot.

from orbit-web.

joeyguerra avatar joeyguerra commented on July 21, 2024

Hey. I just checked out feat/new-orbitdb and ran it, Safari on Mac. Drag and Dropped an image in the chat window and it seemed to upload the image. However, I didn't "see" the image. I'm not sure what to expect though. I'm happy to help, just need some guidance.

I also noticed that assets/common.js doesn't exist after doing nom run build. The resulting index.html file is referencing it though.

from orbit-web.

joeyguerra avatar joeyguerra commented on July 21, 2024

when i drag and drop a file/image, and then click on the resulting link, a js error occurs:

MessageStore.js:263 Uncaught TypeError: this.orbit.getFile(...).then is not a function
    at Store.onLoadFile (MessageStore.js:263)
    at EventEmitter.eventHandler (PublisherMethods.js:44)
    at EventEmitter.emit (index.js:116)
    at Function.trigger (PublisherMethods.js:63)
    at PublisherMethods.js:74

this.orbit.getFile(...)

doesn't seem to be returning a Promise.

from orbit-web.

joeyguerra avatar joeyguerra commented on July 21, 2024

I changed the call to getFile to:

      var stream = this.orbit.getFile(hash)
      if(asStream) {
        callback(null, null, null, stream)
      } else {
        let buf = new Uint8Array(0)
        stream.on('error', (err) => callback(err, null))
        stream.on('data', (chunk) => {
          const tmp = new Uint8Array(buf.length + chunk.length)
          tmp.set(buf)
          tmp.set(chunk, buf.length)
          buf = tmp
        })
        stream.on('end', () => {
          callback(null, buf)
        })
      }

but now it looks like the URI for the file is not correct. getting

File.js:79 Error: this dag node is a directory
    at pull.collect (files.js:154)
    at reduce.js:10
    at drain.js:20
    at map.js:19
    at filter.js:17
    at filter.js:17
    at filter.js:17
    at flatten.js:35
    at drain (index.js:23)
    at index.js:63

from orbit-web.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.