send files to MUC Rooms using XMPP Framework - ios

How to send files to MUC Rooms using XMPP Framework?
I have searched a lot about this.
Using the SI method i get error 503 service unavailable or Wrong JID ,but how to pass a resource for groupchat ?
I had used the method to transfer image using string data but now its not up to my needs. I read that we can upload file to server and send the link instead. I'm using openfire server.
If anybody has some insight about this please share. Any help is appreciated. Thanks !

Yes you can upload your image to a server and send the link.
The flow goes like this:
You need to send a thumbnail image using xmpp (and the link of the original image stored on server), like you must be sending the entire image now in your application.
When the user clicks on the thumbnail image, you can download the original image from the server using that link.

Related

Custom email tracking not sending request when opened in Gmail

I´m trying to develop a custom email tracking system for my Rails webapp following the pixel approach. If I understood it right, the idea is to insert a one pixel image with source to a url that process the request. In my case, when the request is process it sends a new notification email to me.
In the email body I have inserted:
<img src="localhost/api/to?trackId=<%= id %>" style="display: none"/>
When I open the email in web Gmail with Chrome, I see next code, but unfortunately nothing happens:
<img src="https://ci4.googleusercontent.com/proxy/ncea8tesMNBOixfbJrQ1VL458oukzkLaIlWW6RbqedZ9mkMjsfgeIAWa5EWXcX4HOi0vLwDmFg=s0-d-e1-ft#http://localhost/api/to?trackId=1435" style="display:none;outline:none;text-decoration:none;height:auto!important;border:0" class="CToWUd">
When I just type the url directly in my browser, like: http://localhost/api/to?trackId=1435 my server gets the request and process it perfectly.
I have read in some other posts that Gmail is proxing the image and this is not working anymore. However, I think there should be one approach if there are lots of mail tracking services.
Do I have a mistake in my code, or should I try another approach?
Google replaces all images with copies in their cache. This copy cannot be retrieved from your localhost obviously.

Firebase Storage share download url a security risk?

I have an image saved in my Firebase Storage. I would like to display this image in multiple emails that I send. I have so far used the download URL as obtained from my Firebase console and the image displays successfully. My question is: Is this the correct way of sharing the image? Is it secure? If not, then how should I get a secure link to that image?
Here's where I got the download URL from, in the Firebase console:
Any help on this would be appreciated.
Using a download URL is the appropriate way to share files outside of an application, or to users who don't need to be logged in.
I'm curious what you mean by "is it secure"? If you're sharing the object with someone, they can forward the link to someone else who can download it, but they can also just download the object and share it as well.
If you want to control access based on a particular user, you'll need to have users log in and download the objects in an application, rather than using download URLs. Granted, again, here they can take the downloaded object and share it with anyone else.

How to track an gmail's email through an api attach to an src tag of image?

I want to track the email when somebody opens the image attach to that email. So i have been rendering an image byte through an api attach to the image tag rendered in email template. But whwn i am opening the email the src tag embeds the google proxy server address to my api address and not sending to my backend. background-image:url('https://ci6.googleusercontent.com/proxy/RMM_t4IFMpVLwbzLttQJroXN8EPE8atXTqU703UgLhhhytAO-_AvbFUjVyDXKGgcExvdyZtB7aBMSNHphT8n7rVxNMvsij1BsL4SCw=s0-d-e1-ft#https://resources.sparkwork.io/renderImage'). In this my actual api is https://resources.sparkwork.io/renderImage .So how can i solve this problem. Because when i am attaching some image url them its working and showing that image but when i am using my backend api then call is not coming to my backend to render that byte code of image. So any solution to solve this problem ?

Slack image url asks for login

I have integrated slack in my custom application using the API provided by Slack.
I am able to fetch the post from Slack and able to display it in my application. I am able to fetch the image that was uploaded with the post (Few days back) but today when I added a post with the image. The image is not being displayed in the application, when I am trying to access the image URL in the browser it is asking for Authentication.
I am accessing the slack rest API to fetch the post from slack. from the response I am taking the "thumb_64" parameter from the "file" object.
I am able to access the below image URL, this image was uploaded on 2016-01-11
https://files.slack.com/files-tmb/T0F8RH7U7-F0J505EG1-33434fadf3/screenshot_from_2015-12-28_15_23_39_160.png
But I am not able to access the below mentioned URL ,this image is uploaded on 2016-02-16
https://files.slack.com/files-tmb/T0F8RH7U7-F0MHZL70Q-d740ed784b/configration_160.png
Thanks & Regards,
Have you seen the update where #slackapi announced about accessing files using the Web API?
Essentially, you now need to provide authentication to access file assets, by specifying an HTTP Authorization header with an OAuth token that has the correct scopes to access that kind of data for a team.
For example, you'd send a header like this with your GET request:
GET https://files.slack.com/files-tmb/T0F8RH7U7-F0MHZL70Q-d740ed784b/configration_160.png
Authorization: Bearer YOUR_VALID_ACCESS_TOKEN_HERE
The File type documentation goes into further detail.

Facebook Connect for BlackBerry

I'm looking for a solution similar to the iPhone Facebook Connect (https://github.com/facebook/facebook-ios-sdk) for the BlackBerry platform. Basically, I need my users to authenticate against Facebook from within a native BlackBerry application (so, not a Web based mobile application). Is there a library I could use, and if not, what will be the correct approach to achieve this?
Thanks in advance!
Options for BlackBerry are:
Use Facebook Platform for Mobile
Use REST API approach provided by Eki Y. Baskoro
Try to port JavaFB from J2SE to J2ME
I managed to go through Facebook Connect authentication within my BB app. After cracking my head for three days I realised that it is the URL that is the culprit!
Basically these are what you need (assuming you are developing for 4.5 platform):
Using Browser Field, do a POST to http://m.facebook.com/login.php (the mobile version of Facebook) passing all the necessary arguments as per the Desktop application counterparts (one challenge is to get the signature generation correct).
Once the User successfully grants access, capture the URL of the success screen. You will obtain your auth_token.
Do a POST to the REST server to obtain the session key and secret given the auth_token you obtain.
Save the returned session key and secret, persist it, and wholla! your app is up and running.
I am developing a custom LoginScreen and FacebookFacade object to incorporate the first three steps above, if anyone is ever interested to reuse my code. It'll be GPLed, I suppose ;)
Afzal, I had a similar problem and I've found out that I actually had a problem with my connection string. You can look at the following link there is some explanation and code for creating the correct connection string
http://www.localytics.com/blog/post/how-to-reliably-establish-a-network-connection-on-any-blackberry-device/
and just add the connection string to the FetchThread where it opens the connection:
connection = (HttpConnection)Connector.open(absoluteUrl+getConnectionString());

Resources