How to upload file in Angular2

In fact, the Http class doesn’t support that at the moment. You need to leverage the underlying XHR object to do that: import {Injectable} from ‘angular2/core’; import {Observable} from ‘rxjs/Rx’; @Injectable() export class UploadService { constructor () { this.progress$ = Observable.create(observer => { this.progressObserver = observer }).share(); } private makeFileRequest (url: string, params: string[], files: … Read more

Increase upload request length limit in Kestrel

I found this helpful announcement that confirms there is a 28.6 MB body size limit starting with ASP.NET Core 2.0, but more importantly shows how to get around it! To summarize: For a single controller or action, use the [DisableRequestSizeLimit] attribute to have no limit, or the [RequestSizeLimit(100_000_000)] to specify a custom limit. To change … Read more

How To Upload Files on GitHub

I didn’t find the above answers sufficiently explicit, and it took me some time to figure it out for myself. The most useful page I found was: http://www.lockergnome.com/web/2011/12/13/how-to-use-github-to-contribute-to-open-source-projects/ I’m on a Unix box, using the command line. I expect this will all work on a Mac command line. (Mac or Window GUI looks to be … Read more

nginx 1.5+ file upload — best practices

Maybe you can use perl if you don’t like php or lua. http://nginx.org/en/docs/http/ngx_http_perl_module.html#methods $r->has_request_body(handler) But out of the box nginx isn’t the tool to save a received post request and store it. Maybe uWSGI ( https://uwsgi-docs.readthedocs.io/en/latest/ ) is a better way to go with http-socket https://uwsgi-docs.readthedocs.io/en/latest/HTTP.html and a python app.

File upload from

I think that it’s not supported. If you have a look at this DefaultValueAccessor directive (see https://github.com/angular/angular/blob/master/modules/angular2/src/common/forms/directives/default_value_accessor.ts#L23). You will see that the value used to update the bound element is $event.target.value. This doesn’t apply in the case of inputs with type file since the file object can be reached $event.srcElement.files instead. For more details, you … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)