Send angular upload file to server - angularjs

I am trying to upload some image file using angularjs, By using angular uploader. I am able to select the image and it is available in scope model also. My requirement is when I post the model through http post the selected image file should be available in one of model property.
Below is the code for selecting the image and storing the image in model property.
<button" ng-model="AllDate.StudentPhoto">Upload Photo</button>
After selecting I am posting the model to the server and I want that image file inside that model property,
Thanks in advance.

Related

creating a property web application using React, how to get images?

I am making a property selling website--an Airbnb clone.
When you open the Airbnb homepage each property has an image slider function. How would one get the images per property? I can create the slider but how should one design the image getting service?
Because of the SQL backend there is a table for the properties and a table for the image paths. Is this a good design?
A possible solution is to return a JSON object containing the property details and all the file paths that match that property id. But this is expensive per render of the home page.

How to upload text data with files in multipart form data?

Currently I am working on a project in which i want to send item id with the image i uploaded so that later on i can change the name of the image in the backend. So how can i achieve this or how to change the name of the image in frontend ?

display and save a local image into database in react js

I'am developing a blog website using react.js where users can post and comment ...
so we know that a user can comment with an image ,and let's say he want to upload a local image that stored in his machine,i want to display that image as a comment and save it into postgres database which i'am using for that.
My question is what are the steps that i should follow to achieve my purpose,thanks in advance.
If you have to do in simple steps, you can save the image to base64, its just string representation of an image. So it can be saved in DB directly and when you have to show it just decode the string and display it accordingly.
References :-
https://github.com/dankogai/js-base64#readme
https://scotch.io/tutorials/how-to-encode-and-decode-strings-with-base64-in-javascript
Alternatively, what you can do when user selects an image, then upload that image to your server and get the path to that(multipart file upload) and from path you can show it where you want to show.
References :-
how to send a multipart/form-data from React.js with an image?
I hope it helps, Thanks :)

Typo3: Calendar Base (Ext:cal) add Backend and Frontend more 2 img upload options

im new in typo3 and need help with ext mod.
I need to include on backend and frontent more 2 options for upload images on Calendar Base Extension ("cal" on TER http://typo3.org/extensions/repository/view/cal) to show in event view, but the images has to make a relation with the event, so, the upload image is part of the event and i need to put to show this in a defined loacation of template, where i will stylize.
How can i do this?
Sorry for my english.

How Can I get the raw URL of the uploaded media file?

I have a media field through which I both embed video files from Youtube and upload videos to. I do only want to get the raw URL of the uploaded/embedded videos through the views module but I can't manage it. There are predefined formatters for the video field in the view UI, however the link formatter prints additional data that I don't need. How can I get the raw URL only?
Thanks!
The module below lets you manipulate the view using php.
http://drupal.org/project/views_php

Resources