download .cdr files from javascript(react) - javascript

Good morning, I have a problem. The service that I am using in my project will return three files in base64 (.pdf, .xml and .cdr). It works fine when I try to download the pdf and xml files, but when I try to download the .cdr files it doesn't download properly. I already search for several types of mime but it doesn't work. Do you know how I can solve it?

Related

How to download a file in react js from an url

I tried several ways to download a file from URL. Eventhough it is downloading, I couldn't able to view the file. It is showing, the file is not supported

How can add .mp3 or .wav file in asp.net mvc project?

I want to play a warning sound using javascript in the cshtml file. I want to put the audio file ( wav or mp3) under the content directory. I want to play this file in the script using the audio library. I tried to add the file with drag and drop on top of the project but it didn't. I don't want to do a database-related operation.
Solution:
Following the steps, I added the audio file to the bottom of the folder I wanted.
"Right click > Add> Existing item"
You should copy the file in a directory in the project and you should let IIS know that mp3 files are legal. For doing this you have to add MIME type in your project's web.config
Please check this LINK for more information about how to add mp3 files mime type in web.config
You should just need to put the audio file somewhere in your wwwroot so it'll be web-accessible when the project is built. Then you can use the external-facing URL in your javascript to actually load and play it.

Retrieving Gdrive Files

I have a public folder in my drive. I need to be able to download the whole folder, keeping the structure intact, and download certain files. I am using the chrome.filesystem api to overwrite some user files with the ones that are downloaded. I am downloading a json from the same folder to determine which files need to be downloaded. I could list the urls to all the files in that json, but that seems inefficient and is annoying. How could the urls be determined in a better way?
Unfortunately, there is no way to download a whole folder at this moment. I have seen other solutions, for example zipping all the urls and downloading a single zip file. You can read more information on this issue: How i can get multiple files from google drive through the google drive api?

jquery fetch images from url and provide as zip file

I have the URLs of a list of images. Now on click of a link, ineed to to zip the images in all those URL's and provide it as a downloadable file. What i have currently done is,
Pass the URLs to django views
Fetch the images and store it to filesystem
Zip them and
Return a download dialog as response
Now, i am thinking of doing everything at the client side itself.I came across the JS plugin Zip.js that can zip files. My only problem is how to fetch those images from the URL's and zip them in memory using JS.Any help is appreciated.I also came across other plugins to zip files,
http://www.jquery4u.com/javascript/javascriptjquery-zipfilecompressor-plugins/#.UE8cI2AxznA
https://raw.github.com/Stuk/jszip/master/jszip.js
As #VisioN said, the zip.js plugin or any other plugins fails some browser tests, the only way to do this will be on the server side.

Reading remote PDF files with JavaScript

I'm working on an iphone app, that would read pdf files from the folder on web server.
I made the part of app which read PDF files and everthing is fine, now i'm trying to figure out how to load all pdf files from http:/www.blabla.com/pdf, so everytime i upload new pdf, the app would automaticly load it.
Is this possibile, and anybody has ideas how can be done?
This can only be done, by either having Directory Index enabled, or using a server side language such as PHP to read the contents of that folder and output the filenames.

Categories

Resources