Dropzone.js: .zip as acceptedFiles in Safari not working - dropzone.js

I have the following accepted files with Dropzone.js:
acceptedFiles: "image/jpeg,image/png,image/gif,image/jpg,.zip",
When clicking in Safari, the ZIP-files are disabled in the Explorer window to upload. By dropping it's working fine. The clicking is working fine on other browsers as well.
I guess it has to do with the filename extension instead of mime-types. But as there are several different mime-types for zip-files, I'd like to stick with the more general .zip file extension.
Any ideas how to solve this?

Add to acceptedFiles "application/zip" - then even safari accept ZIP files.

Related

I can't save monkeygtd on firefox

The firefox's version is 38.0.
When I try to save the monkeygtd based on tiddlywiki, it reports below.
It's not possible to save changes. Possible reasons include:
- your browser doesn't support saving (Firefox, Internet Explorer, Safari and Opera all work if properly configured)
- the pathname to your TiddlyWiki file contains illegal characters
- the TiddlyWiki HTML file has been moved or renamed
Is there any specific setting on firefox?
I got the solution from there
https://www.mail-archive.com/gtd-tiddlywiki#googlegroups.com/msg01979.html
Paste here:
Open this web-page from Firefox: https://addons.mozilla.org/en-US/firefox/addon/tiddlyfox/?src=search
Install the TiddlyFox extension for Firefox
Re-start Firefox

"Printed" PDF from Firefox too big

I often "print" some webpages into pdf files. Therefore I created an own stylesheet for that webpages so I have only the text I need (I'm using the addon stylish for it).
The problem: If I save the page to a pdf file, it becomes relatively huge. Example: I copied the text to LibreOffice and exported it to a pdf file. The result: about 100kb. With Firefox: 1.8 MB!! And it's only text! (I need that small smize, because I have to email the files)
Does anyone know how I can reduce those files? Maybe with ghostscript or any other commandline-tool?
EDIT:
Sorry, forgot to say: I'm using a Mac!
OMG, I can't believe it!!! I found the solution: Removing the original stylesheets (manually with Firebug or with a greasemonkey script) of the page was the trick. I don't know, where the bug is (Firefox or Mac OS)... it seems, that the background-images of whatever are saved into the pdf, altough they are completely hidden via my stylesheet.
Thanks for your help!

broken image in chrome and firefox works in safari

I have a logo that shows up in Safari but in Chrome it appears as a broken link and simply does not show up at all in Firefox.
<img src="images/logo-01.png"/>
I have re-uploaded it many times and have even tried alternative paths and file names.
anyone know how i might be screwing this up?
I ran into this same problem. For me, it turns out the image was corrupt. If i tried to open the png file up in photoshop, i would get an error saying it could not parse the file.
For whatever reason, safari could display the corrupt file, but chrome could not. This is how i fixed my issue. I noticed "preview" on my macbook could open the file fine. If you are using windows, possibly try paint or gimp or some other program besides photoshop.
I downloaded the corrupt file onto my macbook, opened it with preview (open with > preview)
In the preview app, go to file > duplicate, which makes a copy of your image
Save that duplicated image
As a test, i tried opening that new copied image in photoshop and i was able to!
Upload new file to website. I was able to view the image in chrome now.
Hope that helps anyone who ran into the same problem.
It could be an issue with your file structure. Right now your links are using relative paths (e.g. href="index.html"). This is fine if the file you're referencing is in the same directory as the current page file. But if your current page is located elsewhere, like in a 'pages' directory or something, then you need to tell the links to start from the site root. That would look like href="/index.html" (note the slash). So for the image, you'd have:
<img src="/images/logo-01.png"/>

Firefox shows .gadget files in tab instead of downloading

I have a simple HTML file which references .gadget so that it can be downloaded:
Download me!
IE, Opera, Safari and Chrome all offer saving file to disk, however Firefox loads binary file in a tab. Why does Firefox hate me and what must I do to force Firefox to offer download dialog?
I don't really want to instruct users to "right-click and choose 'save file as'", or that they have to remove .zip extension after downloading.
Server is Apache/2.2.17, in case that it's relevant. Interesting fact is that Firefox does behave like all other browsers - if I load open .html file from local disk. But once it's on the server, it loads file in a tab.
So, here's the solution.
The problem is that Apache returns Content-Type=text/plain HTTP header by default for all "unknown" file types. Firefox adheres to the standards unlike all other browsers so it displays the content. Here's what they have to say about it. You can inspect header in Firefox with Firebug (or simply use curl if you're on Unix).
The above link also hints the solution; register application/x-windows-gadget MIME type with the server. If you don't have access to the server configuration, put .htaccess file in the same directory as your file (or in any of the directories above your directory) with the following line:
AddType application/x-windows-gadget .gadget
After that, don't forget to clear your browser cache.

Chrome/Firefox: access source of an extension

Do Chrome or Firefox make your extension's source code open to the host machine? And if yes where are the respective folder on Mac?
Yes, assuming some or all of your extension is written in an interpreted and un-obfuscated language. Plain Javascript is common for extensions in both browsers.
For any firefox extension, if you save the .xpi file instead of installing it, it is just a zip file and you can open it with any archive tool (e.g. 7zip or WinZip).
The same goes for the .crx files Chrome. As an test, I just downloaded and opened the .crx for Google Mail Checker Plus using 7zip, and it looks like this is entirely written in javascript and all the source can be read.
In either case, how much usable source code you can get from this depends on the language(s) that are used in the extension.
Google Chrome installs the extension into ~/Library/Application Support/Google/Chrome/Default/Extensions/<EXTENSION_ID>/ and registers it in its Preferences file (according to this).
As heb says, Firefox installs the extension to ~/Library/Application Support/Firefox/Profiles/PROFILE_ID/extensions/EXTENSION_ID/
For Firefox the path is:
/Users/YOUR_LOGIN/Library/Application Support/Firefox/Profiles/PROFILE_ID/extensions/EXTENSION_ID/
view online
View a Chrome/Firefox/Opera extension/addon’s source in browser (without downloading):
https://robwu.nl/crxviewer/
bookmarklets
bookmarklets usage
Click the bookmarklet when on an extension’s page in the Chrome Web Store, Firefox addon gallery or Opera addon gallery.
bookmarklets source code
load in same tab
javascript:location.href='https://robwu.nl/crxviewer/?crx='+location.href;
open in new tab
javascript:window.open('https://robwu.nl/crxviewer/?crx='+location.href,'_blank');
bookmarklets links
view extension source online (Chrome .crx) # https://robwu.nl/crxviewer/?crx= ← You can drag this link to your bookmark bar to create the bookmarklet, but you have to edit its URL afterwards: Delete everything before javascript, including the single slash: http://delete_me/
view extension source online in new tab (Chrome .crx) # https://robwu.nl/crxviewer/?crx=
I know it's an old topic but for future research.. it could be interesting..so following the link :
How to find extension code?
This article explains very well where are located extensions code for Firefox, Chrome (working on Chromium too of course) on Ubuntu and Windows!
Best,

Resources