danialfarid / ng-file-upload

Lightweight Angular directive to upload files with optional FileAPI shim for cross browser support

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Upload image on IE with PUT request is sent as POST call to server

mkoppula opened this issue · comments

$upload.upload({
url: url,
method: 'PUT',
file: imageData
});
Logs of demo in IE9 using Charles logger shows that POST call is made even when method type 'PUT' is selected.

The flash file attached is making a POST call to the server always irrespective of method type specified in upload function.

Do we have a solution for this?

The flash doesn't support put requests. PUT is only for HTML5 browsers.

The demo won't allow put for IE8-9 now

The flash doesn't support put requests. PUT is only for HTML5 browsers.

Can you elaborate on this? PUT does work on older browsers (IE8 & IE9 at least). Is the issue with this project, or one of this project's dependencies?

For IE8-9 flash is used to upload the file to the server and flash upload file api does not support PUT request. https://github.com/mailru/FileAPI/issues/141
And they don't support form data to be able to send the file using XMLHttpRequest PUT that's why we are using flash.