Comments (12)
Yes, downloading on iPhone uses FileSaver.js, invoked with a blob. FileSaver.js then internally creates an a
tag with a download
attribute, then the download popup shows.
from jspaint.
@DevJhns It may be a different version of Safari/iOS. Hopefully you can still save files tho if it opens in a new tab, with a long press on the image. Does that work?
JS Paint has File > Manage Storage by the way, if you didn't get it to save before.
from jspaint.
I need to get on which iphone models and which ios versions this Download popup works
@DevJhns a[download]
is supported from iOS/Safari 13.0 onwards: https://caniuse.com/#feat=download
from jspaint.
I don't have an iPhone, so I'd have to get an emulator to test this, but: eligrey/FileSaver.js#324
looks like I might just need to update FileSaver.js
from jspaint.
Or it just doesn't work: eligrey/FileSaver.js#375
@evolveyourmind Do you get a new tab, or just nothing, or what?
from jspaint.
Saving on Safari/iPhone does actually work, users can choose to view/download the file (iOS 13.1.2).
from jspaint.
Okay, great!
from jspaint.
@christianliebel wow, great news!!!
Downloading on iphone works with filesaver.js or native saving from blobs?
from jspaint.
@christianliebel how you achieved this download pop up on iphone?
It works like in your photo on ipad, but on iphone all saved files open new tab (with blob url)
from jspaint.
@christianliebel thx for reply!
Yeah, I kinda get idea, how client-side blobs file saving works, except it doesn't work on Iphone, I can't get Downloads popup, file content opens in new safari tab with blob:45fc-...
url
(but Downloads popup appears on Ipad, like on your photo in same situation)
something like this:
var blob = new Blob(receiveBuffer, {type: 'any/mimetype'});
a.href = URL.createObjectURL(blob);
a.download = 'filename.ext';
as I found out, this happens due to restrictions of iphone file system, but your image shows that this file managment works on iphone, how is this possible?
Does this file managment works only on iphone X and above?
Because I tried saving file from jspaint.app on iphone < X and nothing happened at all.
(with my script example above it opens file in new safari tab, not with safari file manager)
from jspaint.
@DevJhns It may be a different version of Safari/iOS. Hopefully you can still save files tho if it opens in a new tab, with a long press on the image. Does that work?
JS Paint has File > Manage Storage by the way, if you didn't get it to save before.
Yeah. problem that, I'm developing my own app, and this issue not related to jspaint actually, I need to download file (client side, from blobs) and it MUST be loaded in current tab, redirecting to other tab ruins all, and I don't want to store file on server, because file tranasfer happens peer to peer, soo all complicated, my app works everywhere except iphone (it opens file content in new tab, yeah file can be downloaded from new tab, but connection closes on redirect) so I need to get on which iphone models and which ios versions this Download popup works
thx for help!
from jspaint.
I need to get on which iphone models and which ios versions this Download popup works
@DevJhns
a[download]
is supported from iOS/Safari 13.0 onwards: https://caniuse.com/#feat=download
I know, but this pop up (Downloads block) https://user-images.githubusercontent.com/6698344/66068025-1f301c80-e54d-11e9-82eb-cbc5b33c8c3a.PNG
doesn't appear on ios 13.3 (not sure if it is iphone 7 or 8, just know it is < X)...
and you say this Download popup works on your iphone
from jspaint.
Related Issues (20)
- Unable to Rotate By Angle HOT 2
- "Width" field is not focused and selected when opening Image -> Attributes... HOT 3
- How to open multiple windows in electron macOS? HOT 2
- why does electron app make requests to internet when started? HOT 4
- Bucket tool went weird today HOT 5
- i cant draw after making 1 brushstroke or anything on the canvas HOT 3
- Pixel data offset field from the BMP header is ignored
- The Recover Document (Woah!) pop-up still occurs despite the following HOT 2
- Blended/Anti-Aliased edges on rectangle tool HOT 4
- every stroke i make does not save on the canvas and keeps deleting the previous one HOT 31
- [feature] comic creator
- Shortcut keys?
- Pasted screenshots show up twice as big (HiDPI Retina screenshot) HOT 1
- Error when changing eraser size with keyboard
- Internal copy not working on macOS Safari
- Error trying to paste a screenshot on Windows 11
- Errors trying to paste/open an SVG file
- Shift+Insert, Ctrl+Insert, and Ctrl+Delete shortcuts throw errors HOT 1
- .bmp file saves incorrectly
- [feature] Windows 3.1 style tools HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jspaint.