On Mon, Sep 29, 2014 at 1:06 PM, system <[email protected]> wrote:
> Base 64 could be a good reason, if you need to return it back also in base64
> (e.g. data to script, so script could process image). For me, ability to
> provide unique url for images are essential (very subjective).

Thank you very much.
So, if i only want to save the image in server, and then give it some
random name, what i should choose is multipart/form-data?

>
>
> - Konstantin
>
>
> On Sunday, September 28, 2014 12:37:31 PM UTC+3, Bo Lang wrote:
>>
>> Hi all,
>>
>> I want to ask the "right" way in angularjs to upload file, in my case
>> image file.
>>
>> So far, i worked with JSON API and i uploaded the file by encoded it in
>> base64 and included it in json string.
>> I did it because this is the requirement given by the senior programmer.
>>
>> And then i just found that we can do it in multipart/form way.
>> (It might sounds funny, but i am not really a web programmer, my
>> previous job was embedded system programmer :) ).
>>
>> I think multipart/form way is more common in web programming, but i also
>> find it to be hacky in angularjs because angular’s ng-model doesn’t work
>> on inputs with type=“file”.
>> I am wondering if this behaviour is intentional, because i think
>> angularjs developers will be able to do it, if they want.
>>
>> So, what is recommended way to upload file (in my case image files with
>> size < 2 MB), using base64 encoded string or multipart/form-data.
>>
>> My concern about base64 is that it has bigger size.
>
> --
> You received this message because you are subscribed to the Google Groups
> "AngularJS" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to