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.

Following the documentation on how to use Blobs with Cypress we have arrived at the following piece of code:

.fixture('upload_teachers.csv').as('teachers')
.get('input[type="file"]').then(function($input) {
  Cypress.Blob.binaryStringToBlob(this.teachers).then(function(blob){
    $input.fileupload('add', { files: blob });
  });
})

However we keep running into the same error:

Uncaught (in promise) TypeError: $input.fileupload is not a function

Running CLI v0.12.0 and App v0.18.5.

Would appreciate any help!

Issue Analytics

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

github_iconTop GitHub Comments

3reactions
jennifer-shehanecommented, Jan 17, 2017

Currently, the documentation expects that you use the jQuery File Upload plugin. The fileupload function comes from this plugin.

Sorry this was not made very clear in the documentation. We do plan to handle file uploads in a better way in the future, but this is the best workaround to test them for now.

2reactions
javieravilescommented, May 14, 2018

Will leave this here in case it helps somebody https://github.com/javieraviles/cypress-upload-file-post-form

Read more comments on GitHub >

github_iconTop Results From Across the Web

Import or export text (.txt or .csv) files - Microsoft Support
Import a text file by connecting to it (Power Query) · On the Data tab, in the Get & Transform Data group, click...
Read more >
CSV Upload - CleverTap Overview for Users
CSV Upload Steps ... Login to your CleverTap account, and then click Setting> CSV Uploads. ... Click the "Import new profiles from CSV"...
Read more >
Format upload files - Analytics Help - Google Support
The data files must be uploaded in CSV (comma separated values) format. The CSV file's header must exactly match the target Data Set's...
Read more >
Import user data with a CSV file upload
Step 1: Prepare the CSV file · Step 2: Upload the CSV to your Leanplum Google Bucket · Step 3: Construct the API...
Read more >
Upload CSV Files From Your Computer - Datapine
Upload CSV From Computer · 1) Check if your CSV file meets our requirements in terms of structure and file format. · 2)...
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