How we can get url from local storage? I need to send the image that I've picked from local storage to server. My friend told me to get url from the image. How can i do that? I work on fragment rather than activity. This is my fragment code: https://codeshare.io/3AMWY6 and this is my viewmodel code: https://codeshare.io/Lw0xnl I can get image from gallery but can't send it to my server. And my friend says that what i need to do is to get the url from the image. But i don't know the way to do it because i new in kotlin. Thank you for answering.
Related
We need to have the ability to set a custom image for new channels.
From docs https://getstream.io/chat/docs/#initialize_channel, I can see the field image and if send here some remote URL - works fine.
But what to do when we need to send an image from the phone? For sending image for message I can see the functionality. But it's bonded to channel which is going to be created.
I know we can use base64, but I hope there is a better way of doing the required functionality? (like upload the image to server and get remoteURL)?
I study the phoenix, create an application that loads the image on aws s3, and then displays it. I was able to upload the image to the cloud, but now it is not clear how to display it to the user on the page (I do not want to make public link to these images in the cloud). I was looking for information on this issue, but did not find anything useful.
From the clouds I get the file as binary data. Do I need to create some of these data is a temporary file that will be displayed on the page? I can display the image as base64, but I think this is not the best way. I would appreciate advice.
Since you've already fetched the image to a binary, you can just send it directly to the client with the appropriate content type and the browser will render it as an image. For example, to fetch and send the png at https://upload.wikimedia.org/wikipedia/commons/7/70/Example.png:
def index(conn, _params) do
image = HTTPoison.get!("https://upload.wikimedia.org/wikipedia/commons/7/70/Example.png").body
conn
|> put_resp_header("content-type", "image/png")
|> send_resp(200, image)
end
If you open this in your browser, you'll see the image being rendered correctly because of the content-type header.
I've been looking for a solution to my problem for a while and didn't get the answer.
I have a page with a VideoDisplay object and a "Take screenshot" button. I would like to get the screenshot from the streaming video and save it but I'm getting an error:
Security sandbox violation: BitmapData.draw: http://xxx/xxx.swf cannot access rtmp://xxx/xx/xx/. No policy files granted access.
The domain of the website from which I'm capturing the image and the rtmp is the same.
I'm using ImageSnapshot class to capture the screenshot. This is the function responsible for taking the screenshot:
function takeSnapshot()
{
var imageSnap:ImageSnapshot=ImageSnapshot.captureImage(mainPlayer);
var imageByteArray:ByteArray=imageSnap.data as ByteArray;
var fileRef:FileReference=new FileReference();
fileRef.save(imageByteArray, "screenshot.png");
}
I've got also a cross-domain policy file with a lin:
<allow-access-from domain="*" />
I'd be grateful for your help.
It seems someone has figured it out.
He was having an issue with not connecting to the stream correctly
Have a look
Flash Player cannot access bitmap data
or sound spectrum data for media
loaded from RTMP sources, although it
can display and play bitmaps and
sounds loaded from these servers.
Requirement of my project is, if device have internet connectivity, need to get the content from server and show it in UIWebview, other wise get conent from local. For that i have stored xml content to sqlite, i don't know how should i save the images which comes in HTML NODE to local. can any one help me out.
Thanks
sri
You are getting url of the image. You can create the documentdirectory and save the images in that directory. http://developer.apple.com/library/ios/navigation/index.html?section=Resource+Types&topic=Sample+C#section=Resource%20Types&topic=Sample%20Code from this url you can find Apple sample code regarding url connection
Hi I created a desktop application. I was wondering what I should put for my Canvas Callback URL. I tried to define it as local (http://localhost:8084) but it doesnt accept it.
I need it to get the session using http://www.facebook.com/login.php?api_key=YOUR_API_KEY&v=1.0
Thanks!
Your canvas callback URL has to be an address that Facebook can actually fetch data from. That is not localhost, since as the name implies that is local to you.
Read the following: http://wiki.developers.facebook.com/index.php/Canvas_Callback_URL#How_It_Works
Your canvas page URL is http://apps.facebook.com/foobar/
Your canvas callback URL is http://www.foobar.com/yourapp/
[...etc]
Putting localhost as the canvas callback url is like buying something online and filling the shipping address as "my house".
For some basic information on how a Facebook application works, this is a good reading material:
http://wiki.developers.facebook.com/index.php/Anatomy_of_a_Facebook_App