Closed Petschko closed 2 years ago
Someone has requested the documentation of this error: Requesting SEC7134 documentation
It seems that running from local file may bring security risks. So some browsers will block it. Is there any solution to run from http instead of blob?
And... May be the same reason as IE? #5
It seems that running from local file may bring security risks. So some browsers will block it. Is there any solution to run from http instead of blob?
If you run this Script local, there is theoretically no reason to use HTTP, also you would need a local Web-server to run this Script local via HTTP.
Feel free to fork this project and exchange BLOB to HTTP-Downloads. The reason why I didn't added HTTP Downloads to this Project, was because I wanted that Script be able to run local without any Webserver. (Easy to use)^^
And... May be the same reason as IE? #5
Hm that can may be. It also seems I have to use a different method to create BLOBs in IE, but I'm unsure if I include that, since IE is not supported anymore
About Edge, I need to test that in a VM, since I don't have Win10 to test Edge. But I will surely look into that, BLOBs should work in Edge, since its more commonly used the last years
Some suggestion is using msSaveOrOpenBlob
on Microsoft browsers.
So I tried to update the code at the end of RPGFile.js but when I click Decrypt button the decrypted image is opened directly.
It seems that the code works. But I'm not familiar with js at all and don't know how to fix it. Hope it can help.
/**
* Creates the BLOB-URL for this File
*/
RPGFile.prototype.createBlobUrl = function() {
this.blob = new Blob([this.content]);
if (window.navigator && window.navigator.msSaveOrOpenBlob) {
window.navigator.msSaveOrOpenBlob(this.blob, 'img.png');
} else {
this.fileUrl = window.URL.createObjectURL(this.blob);
}
//this.fileUrl = window.URL.createObjectURL(this.blob);
};
I think msSaveOrOpenBlob
is just for opening/saving, but it's a step into the right direction!
Fixed https://github.com/Petschko/RPG-Maker-MV-Decrypter/commit/bace698455814bfcd9a02595ba1738bf216f64b7 (Also fixed the issue for Edge, since its chromium based)
Can't view the Files in Edge-Browser...