Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

278
Views
Uncaught TypeError: pubnub.sendFile is not a function

I'm trying to upload an image with PubNub API in Ruby on Rails.

This is the input to upload the image and a button to call the function testf()

= file_field_tag "image", accept: 'image/jpeg, image/png', id: 'image_submit', name: "input[file]"
button onclick="testf()" test 
javascript:

const input = document.querySelector('#image_submit');
  
function testf(){
  const [file] = input.files;
  pubnub.sendFile({
    channel: 'my_channel',
    file: file,
  })
}
about 4 years ago · Santiago Gelvez
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!