Application Octet Stream Filename

Posted by admin
Application Octet Stream Filename Average ratng: 3,6/5 3151 votes

File Extensions Associated with application/octet-stream MIME: PKG file extension (3D Image Files). Automise ActionStudio Action Design (VSoft Technologies Pty Ltd.).

I am trying to download a file using data uri in following manner:

The problem is that the downloaded file is always named 'Unknown', whatever I try to use as filename. Is this the correct way to give the file a name ? or something else needs to bedone ?

parbiparbi
Application Octet Stream Filename

5 Answers

Here's the solution, you just have to add a download attribute to anchor taga with desired name

Another solution is to use JQuery/Javascript

Ashraf BashirAshraf Bashir

On Safari, you might want to use this, and instruct the user to ⌘-S the file:

Stream

Otherwise, this uses Filesaver.js, but works ok:

The spongebob squarepants movie online. The SpongeBob SquarePants Movie online for Free. The SpongeBob SquarePants Movie full episode in High Quality/HD.

Note: There is some AngularJS in the code above, but it should be easy to factor out..

malixmalix

For those that are using other libraries like angularjs or backbone, you can try something like this.

$('a.download').attr('href', 'data:application/csv;charset=utf-8,'+$scope.data);

RickRick

I had the same issue and finally I solved in all browsers serving the CSV file in the server-side:

Aral RocaAral Roca
Application Octet Stream Filename

For anybody looking for a client-side solution using Javascript only, here is mine, working on any brother except IE 10 and lower (and Edge .. Concurrent engineering best practices. why ?!) :

SynedhSynedh

Not the answer you're looking for? Browse other questions tagged htmldata-uri or ask your own question.