Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Payments Imports #145

Open
righel opened this issue Apr 1, 2019 · 0 comments
Open

Payments Imports #145

righel opened this issue Apr 1, 2019 · 0 comments

Comments

@righel
Copy link

righel commented Apr 1, 2019

Description

When trying to import a .csv file with payments a javascript error occurs.

image

To Reproduce

Steps to reproduce the behaviour:

  1. Go to '/admin/payments/import'
  2. Drag and drop a file e.g. payments.csv
  3. Click on 'Upload'
  4. See error

By uploading the file using Postman I get this error:

(1/1) TypeError
Argument 1 passed to League\Csv\AbstractCsv::createFromFileObject() must be an instance of SplFileObject, instance of Illuminate\Http\UploadedFile given, called in /home/lrighetti/hackerone/Ticketing/app/Http/Controllers/Backend/PaymentImportController.php on line 154

Adding this line:
$file = new SplFileObject($file);
Just before:
https://github.com/JanoCodes/Ticketing/blob/master/app/Http/Controllers/Backend/PaymentImportController.php#L153
Seems to fix it.

Desktop

  • OS: Ubuntu 18.04 64 bit
  • Browser: [Firefox Quantum 66.0.2, Chromium Version 73.0.3683.75 ]

Greetings,
Luciano.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant