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

Allow all 2xx codes #400

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ogonkov
Copy link

@ogonkov ogonkov commented Jun 13, 2017

All 2xx codes would be treated as the success one

@ogonkov
Copy link
Author

ogonkov commented Jun 13, 2017

@RubaXa а что с тестовой картинкой?

Running "curl:jpg" (curl) task

Verifying property curl.jpg exists in config...OK

Files: [no src] -> tests/files/big.jpg

Warning: Fetching "https://dl.dropboxusercontent.com/u/49592745/BigJPG.jpg" failed with HTTP status code 404� Use --force to continue.

Aborted due to warnings.

npm ERR! Test failed.  See above for more details.

The command "npm test" exited with 1.

@RubaXa
Copy link
Contributor

RubaXa commented Jun 14, 2017

@ogonkov да, с картинкой какая-то лажа произошла, в субботу буду разбираться.

@RubaXa
Copy link
Contributor

RubaXa commented Jun 19, 2017

@ogonkov готово, файл вернули, влейте актуальный мастер.

@ogonkov
Copy link
Author

ogonkov commented Jun 21, 2017

Тесты не знаю куда воткнуть, открыл файл с тестами, испугался и закрыл

@RubaXa
Copy link
Contributor

RubaXa commented Jun 21, 2017

А в чём проблема?

Нужно сделать подобное:

	test('upload file', function (){
		stop();

		FileAPI.upload({
			url: controllerUrl,
			files: { text: FileAPI.getFiles(uploadForm['hello.txt']) },
			data: {allowedStatus: 232},
			complete: function (err, res, xhr) {
				start();
				// тут проверяем статус xhr
			}
		});
	});

Тут нужна обработка allowedStatus
https://github.com/mailru/FileAPI/blob/master/node/server.js#L29-L47

@ogonkov
Copy link
Author

ogonkov commented Jun 21, 2017

ok, завтра гляну подробнее

@ogonkov ogonkov marked this pull request as draft September 22, 2020 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants