Wimpy Player unable to play from local server? - javascript

It seems wimpy player tries to append http://root/link_i_provided to find the location of the file.
I already have the location of my file which is on another server. I can play this directly from the browser just fine so I know the link works.
wimpyButton.play('\\10.10.2.2\storage\calls\call1.wav')
It tries to turn my link into an http link like the following
http://mywebsite.com/10.10.2.2/storage/calls/call1.wav
Which of course it can't find. What do I need to change within the Wimpy Player js to stop this behavior? Or perhaps another solution?
EDIT
It looks like this may not be possilbe due to browser security. I'd have to turn the server that holds the recordings into a web server and provide the links that way it seems.

put your files needed on google drive inside a folder, then get the sharable link of that folder. with that you can reference files needed with www.googledrive.com/host/IdNumberOfFolderHere/fileNameOrNestedFolder/fileName.blah

Related

File System Access API open file with local default application

In a web application I am working on I would like to be able to download files, modify them localy and reupload them to the server.
To make it as easy as possible for the users, I would like them to choose the download location and use a single button to upload the changes afterwards.
My current apporach is the following:
Use window.showSaveFilePicker to choose location and get a FileSystemFileHandle
Download the content and write it to the FileSystemFileHandle
Show a button which allows to upload the changes using FileSystemFileHandle#getFile to get the modified content.
This approach works pretty well but the user has to manually search and open the file after the download and I would like to support them in this step and make it as simple as possible.
Ideally the file should automatically be opened with the default application after the download but I couldn't find a way to do that.
One idea was to open the file in a new tab using the file://-URL, allowing the browser to decide what to do but the FileSystemFileHandle does not seem to expose the absoulte path.
Is there any way to open the downloaded file with the default application? If not, what other possibilities are there to make the mentioned use case as simple as possible?
Thanks in advance
EDIT:
I found that you can open certain applications using special urls like ms-excel:ofe|u|file://path/to/file.xls.
This would be enough for most use cases but for this to work I would need to get the file url from a FileSystemFileHandle.
For security reasons, there is no way for a Web app to open local apps. In the future, though, once file change events are implemented, you can await changes to the file, and then re-open it. This should solve your use case.

File Upload/Manipulation/Download without use of a server: Is it possible?

I am looking to make a website that does three things:
The user can upload an image to the website (without a server)
-For this problem, I have found resources like Dropzone, but all seem to mandate sending the image to a server.
The uploaded file is manipulated on the client side
-For this problem, I need the uploaded file to be accessible from my JS/HTML code and I need some way for me to manipulate the file. I currently have my website with the pre-set file embedded in it, which I can then access and manipulate with JS, so the manipulation itself isn't much of the issue, but rather just accessing the file.
The user can then download the manipulated file (again, without a server)
-For this problem, I know that how to make a download button for files that have a web address (which are on a server), but is there a way to have a download button for the file that was just manipulated? I found this question here that seems to be a good starting point, but I am not sure if I completely understand the implementation of it.
Basically, I have the website framework in place (using HTML/CSS, Javascript) and I am just looking to see if this is possible to do without the use of a server, even if I have to use some other libraries. If any insight or links to potentially useful articles/libraries could be given on any one of these three points, I would much appreciate it.
Note: If this is not possible without a server, please let me know because then I will have to completely redesign everything and this whole question is trivial.
The user can upload an image to the website (without a server)
A website is typically hosted on a server. I think you mean the image is uploaded, but not stored anywhere.
The uploaded file is manipulated on the client side
There are lots of cool JS libraries to handle this, for something light you can try out https://fengyuanchen.github.io/cropperjs/
The user can then download the manipulated file (again, without a server)
So if I am understanding you are asking for an image upload -> edit -> image download. This is very possible and common. However, you will need somewhere to cache the uploaded image for the client.
If you are asking if you can upload an image directly to the DOM, you can not. You need to upload the image to the location where your files are being hosted. Imagine having an absolute path to C:/MyComputer/MyImage, it would obviously not work on any other machine than your machine.
If you need some examples on how to handle the upload image to temp location -> edit -> download let me know

Download external website with nodejs (including resources)

I want to download a webpage, say http://www.stackoverflow.com with nodejs. Meaning that I have an offline copy of the static page. It has to download the resources (like styles, javascript files, images etc) and update the references to local ones.
In any case I want an offline page that once opened looks exactly like the real page. Just like what happens when I choose file->save in a web browser.
Basically I want to replicate the function of
wget --page-requisites
(Although this does not download css and images properly)
The background is that I want to execute Javascript on an external website. This is (rightly) not possible due to cross-domain-policies. To avoid this, I just want to download the website and statically host it myself, execute my Javascript analysis-code and then delete it.
I'm sort of spit-balling on a solution that could work for this:
A package like js dom could be used to grab all the page's script, link, img, etc's source URLs. You could then GET and save each of those resources to your local environment and replace their src attributes with a new URL that points to your local copy. Then you could stringify the resulting HTML and save that as well. Then just serve the containing directory statically in Node.
Maybe just running wget --page-requisites from within node is the easiest solution?
I'll be interested to know what the final solution to this is. Hopefully something I said helps.

Client side scripting to make changes in a file

Is there any client-side script that would be able to make changes to a file on the hosts computer? (Intention stated below)
I am creating a packaged app for chrome which can show some online data, and make it available even when offline.
There is a certain thing, for e.g. 'a webpage' i want to show/store (but i cannot get/read its contents due to it being on different origin). To show when online, i can use iframe, but am unable to preserve it for offline.
So i thought i could make an appcache (manifest within the application package) which will cache the file, and on press of an update button a script would run which would make some change to the manifest which would force the cached resource to be reloaded.
I searched a lot, but no results.
Any suggestions as to how it can be done. Or any other way to get it to work?
I don't think so. This could be a huge security problem if it existed.
If you had to, you could send an ajax request to the server to create a file it creates with the current prices, and add it to the appcache file.
Here is a link to another SO quesitob that has a list of APIs you could use to get your stock price.
Webservice to get stock quotes?

Read Flash Cookie from javascript or ASP.Net

We have a flash video that was created for our project, we dont the source so we have to work around the compiled flash file. We are going to host the video on our domain and the video creates a sol cookie (flash cookie) file to store how far the user has proceeded though the video. So my plan is to access this cookie to see how far the user has progressed and then fire an event when they have finished the movie.
I have been googling for some help but haven't found to much. I have found out that its possible to do in javascript and I have found some .net sol file viewers but haven't seen any examples I can get my mind around.
I have watched the traffic that gets created with fiddler and every time the next button is clicked a new request is fired with the swt file that is being accessed. I would also be happy with tracking every time one of these swt files has been accessed as well.
Thanks
I'm not familiar with flash, but I'm sure you need to build another flash-movie(those shared objects can only be accessed from flash-movies).
So what you need is your own flash-movie embedded in the page, that reads the 'cookie' and transfers the data to javascript.

Categories

Resources