Why is webkitRelativePath always empty in Safari browser? - javascript

I need to support folder upload in my website similar to Google Drive.
I'm using webkitdirectory for this. Using webkitdirectory sets webkitRelativePath for all sub-files of the selected folder. But this only works for Firefox and Chrome.
Is there are any way to achieve the same result in Safari Browser?
That could be helpful too, thanks.

Related

unable to display the PDF in IE when PDF is in local drive

My requirement is very simple but unable to get the solution.I am working with angularjs and java application.
I want to read the PDF document stored in local drive and display on the webpage and should work in IE and chrome.
I have tried different approaches using PDF.js, Jsoup.jar and iTextAPI.jar,but still could not able to succeed displaying on webpage both in IE and chrome.
Any suggestions would be of great help. I want to know an API which can be used to read the PDF from local drive and show on the webpage(should work on IE and chrome).
I have tried this read the pdf and display in IE, but could not able to show PDF in IE. No errors are shown on the console.

Download file in Safari with JavaScript

Is there a way to download a file with the filename in Safari using JavaScript/jQuery?
I've created an anchor element with a url that looks like this:
Download File
Unfortunately, the download attribute hasn't been implemented in Safari yet (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a). So when the file downloads in Safari (my version is 8), the file name is "unknown".
Is there a workaround so that when the file downloads in Safari (8+), it will have the filename?
I downloaded a file from dropbox in Safari and it worked fine, filename and all. How'd they do that??
I found a solution in case anyone runs across this problem. jQuery fileDownload works fine in Safari event though the developer doesn't officially list it as a supported and tested browser. https://github.com/johnculviner/jquery.fileDownload

Acro JS : hostContainer.postMessage is not working in Chrome and Firefox

I am trying to send a message from a html page to an embedded PDF by using hostContainer.postMessage API from Acrobat Javascript API.
This works in IE9 but it does not work in Chrome and Firefox.
I have tried by disabling their own PDF viewer and enabling acrobat reader and still it does not work.
Does anyone face this issue?
Thanks
hostContainer.postMessage posts from active script (running in adobe reader activeX) to the the javascript running in browser. you saying you want it the other way around...
however if you want to post from within the active script running in pdf reader activex to the javascript runing in browser here's two sources that could help you
Get the current page in PDF Java Web
pdf object.messagehandler onMessage not working in IE
personally I manage to make it work in IE but not in Chrome nor in FF.

Audio.js and .ogg on Firefox for Mac

Got a bit of a weird issue. I am using Audio.js to play some audio files.
Across all platforms and all browsers everything works perfectly apart from Firefox for Mac. The files just do not want to play. They download OK and Audio.js outputs thats they have fully downloaded, but will not play. I have tried files uploaded to our cloud storage provider (they stream fine on all the other browsers), the same files served locally and a third party .ogg file found online.
Nothing.
Anyone had issues with .ogg files playing on Firefox for Mac? Would it be a files header issue? Anyone had issues with Audio.js having problems playing .ogg files in FF on a Mac?
From the docs, ogg vorbis files are not supported. Also, the implementation needs flash in Firefox to work it seems: kolber.github.io/audiojs
(Since your test-case works only in FF on Windows, and not FF on OSX):
FF on Windows can use OS-level MP3 implementation, whereas FF on OSX does not have access to the MP3 codec freely.. not sure if that's what's causing it, but it could be used for the feature detection in the library (as it is an OGG)

File Upload issue in ipad

I am using http://uniformjs.com/ for form elements its work fine in all browser as well as different devices, but only a thing which I noticed is about “File Upload” function is not work in iPad.
Anyone can guide how to fix this issue, without download any other supported app like picupapp.com
Thanks
In iOS (iPhone and iPad), file upload through browser just doesn't work.
You'll need to create an App for that. See some info about file upload Cocoa here: How can I upload a photo to a server with the iPhone?
Or, if you can afford to leave out all the pre iOS6 devices, it seems like they added support for <input type="file"> in their latest version.

Categories

Resources