I am trying to create vcf file using vCardJS package in ReactJS but when I try to add my social media links, it appears broken in my IOS mobile device
vCard.socialUrls['facebook'] = 'https://twitter.com/kahvedenotlar';
vCard.socialUrls['linkedIn'] = 'https://...';
vCard.socialUrls['twitter'] = 'https://...';
vCard.socialUrls['flickr'] = 'https://...';
vCard.socialUrls['custom'] = 'https://www.usejanus.com';
It's a vCardJS bug, which apparently has been fixed in the latest code but not packed for distribution version yet (v.2.10 at the time of writing).
As a temporary measure, you can fix it yourself in your code:
let vCardString = v.getFormattedString();
vCardString = vCardString.replace(/SOCIALPROFILE;CHARSET=UTF-8;/gm, "SOCIALPROFILE;");
Related
I am trying to utilize the Azure Maps Cluster Pie Chart feature with on a map in a Perspective mode, and this does not appear to be possible.
Is there a way to implement this feature in Perspective mode?
https://azuremapscodesamples.azurewebsites.net/HTML%20Markers/HtmlMarkerLayer/Clustered%20Pie%20Chart%20HTML%20Markers.html
I found the bug in the HtmlMarkerLayer class. It's actually being caused by a bug deeper within the SDK itself which I have reported to the team but will take some time to get resolved. In the mean time, here is a workaround you can implement to resolve the issue in your app:
Open the HtmlMarkerLayer.ts file I'll refer to the line numbers in the file I just linked.
At line 289 there is a line of code that looks like this:
var shapes = this._map.layers.getRenderedShapes(null, this, this._options.filter);
Replace this line with the following code:
const source = this.getSource();
const sourceId = (typeof source === 'string')? source : source.getId();
//#ts-ignore
const shapes = this._map.map.querySourceFeatures(sourceId, {
sourceLayer: this.getOptions().sourceLayer,
filter: opt.filter
});
I am currently developing a Meteor React app, which is using the ostrio:files package to store audio files in a collection named Files. In another (regular mongo) collection, I am using the following code in the transform function to "join" the document with the link to the audio file:
transform: function(doc){
let curAudio = doc.audio;
let audioFile = Files.collection.findOne({_id: curAudio.file_id});
if(audioFile){
curAudio.audioLink = Files.link(audioFile);
curAudio.audioLength = audioFile.meta.length;
curAudio.audioSize = audioFile.size;
doc.audio = curAudio;
}
return doc;
}
This seems to work just fine, as the resulting audio.audioLink is something like
http://localhost:3000/cdn/storage/files/8Q7WwEXyJSkNWwFQa/original/8Q7WwEXyJSkNWwFQa.m4a
But when I try to do something like this
<audio controls preload="none" style={{width: "480px"}}>
<source src={track.audioLink} type="audio/mp4"/>
<p>Your browser does not support HTML5 audio.</p>
</audio>
To be able to play the file, everything works until I click the play button of the HTML5 player. Then, chrome outputs to the console, that the server returned 404 when the file was supposed to be loaded. I tested putting the link into the adress bar, here the server response is just
File Not Found :(
Does anyone have an idea how to fix this?
I found the answer:
My local Ubuntu installation was apparently configured to store uploaded files in /tmp, which didn't caus problems until I restarted the system or cleared my temporary files otherwise. Having the server recreate the DB fixed the problem.
I've been trying to upload a user profile picture during the user registration using Service 3 and so far I haven't had any luck. I tested passing a hard coded fid in the field "picture" and also tried to pass the fields "filemime", "filename", etc. and it didn't work neither.
Any idea about what fields I need to populate?
I guess it must be related to this post Using Drupal Services and DIOS SDK for setting user picture in iOS app
but it doesn't have and answer neither.
I use following code -
//Picture is first uploaded from ios using file service and fid is passed in $data object
$file_contents_object = file_load($data->picture_fid);
$file_contents_array['fid'] = $file_contents_object->fid;
$file_contents_array['uid'] = $file_contents_object->uid;
$file_contents_array['filename'] = $file_contents_object->filename;
$file_contents_array['uri'] = $file_contents_object->uri;
$file_contents_array['filemime'] = $file_contents_object->filemime;
$file_contents_array['filesize'] = $file_contents_object->filesize;
$file_contents_array['status'] = $file_contents_object->status;
$file_contents_array['timestamp'] = $file_contents_object->timestamp;
$file_contents_array['rdf_mapping'] = $file_contents_object->rdf_mapping;
//use your cck field here
$user_obj->field_user_profile_picture['und'][0] = $file_contents_array;
Hope this will help.
Does anyone know how to display the supported file type icons in WP8 ?
I have links on a xaml page which by clicking opens pdf, excel, word, powerpoints etc and these work nicely.
I would like to get the "official" icon which I can see for example in the office app in WP8 next to the link to indicate what kind of a file is in question.
I know from the file mimeType (for example application/pdf) what file is in question
Does anyone know how to accomplish this ?
Thanks,
Jani
Firstly, you need to get app product id, then use below code to get stream for official icon.
But you couldn't get icon of apps which are not scanned by InstallationManager.FindPackages().
IEnumerable<Windows.ApplicationModel.Package> apps = Windows.Phone.Management.Deployment.InstallationManager.FindPackages();
foreach(var app in apps)
{
if(app.Id.ProductId.Equals("APP_ID", StringComparison.InvariantCultureIgnoreCase)
{
var token = p.GetThumbnailToken();
var name = app.Id.Name + SharedStorageAccessManager.GetSharedFileName(token);
await SharedStorageAccessManager.CopySharedFileAsync(ApplicationData.Current.LocalFolder, name, NameCollisionOption.ReplaceExisting, token);
var file = await ApplicationData.Current.LocalFolder.GetFileAsync(name);
var randomStream = await file.OpenReadAsync();
Stream stream = randomStream.AsStream();
}
}
name = Lucas description = Drupal-thema gemaakt voor de kinderafdeling
AZ St-Lucas Gent. package = Core version = VERSION core = 7.x
stylesheets[all][] = style.css
scripts[] = scripts/lib/modernizr.js
settings[garland_width] = fluid
; Information added by drupal.org packaging script on 2013-02-20
version = "7.x" project = "drupal" datestamp = "1361393684"
It's possible that your JS file isn't at that location, meaning that Drupal will automatically avoid generating a 404 by omitting the call to the non-existent file.
You could also rely on the Modernizr Drupal module and it takes care of placement for you. It can also keep Modernizr up to date more easily by supplying you with a drush command to refresh the file, along with a nice API that allows for custom builds to be generated more conveniently. Check it out!
see the installation instructions to use modernizr http://drupal.org/project/modernizr