I try to make a test with image uploading from local machine. To be able run this test I use FileDetector.
fileToUpload = '/some/path/to/image.jpg';
absolutePath = path.resolve(__dirname, fileToUpload);
browser.driver.setFileDetector(new remote.FileDetector());
But when I send file to upload I get error:
UnknownError: invalid code lengths set
at new bot.Error (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/error.js:113:18)
I run test with webkit webdriver in ubuntu. Error is being reproduced only with big images (900x900px). With small ones (16x16px) works fine.
Thanks