mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-26 09:46:19 -04:00
Add alert for iOS when receiving big files using a private tab
This commit is contained in:
parent
2d2cfec5f0
commit
d8908e01ea
1 changed files with 4 additions and 1 deletions
|
@ -1799,9 +1799,12 @@ class FileDigester {
|
|||
}
|
||||
|
||||
processFileViaMemory() {
|
||||
// Loads complete file into RAM which might lead to a page crash (Memory limit iOS Safari: ~380 MB)
|
||||
if (window.iOS && this._totalSize > 250000000) {
|
||||
alert('File is bigger than 250 MB and might crash the page on iOS. To be able to use a more efficient method use https and avoid private tabs as they have restricted functionality.')
|
||||
}
|
||||
Logger.warn('Big file transfers might exceed the RAM of the receiver. Use a secure context (https) to prevent this.');
|
||||
|
||||
// Loads complete file into RAM which might lead to a page crash (Memory limit iOS Safari: ~380 MB)
|
||||
const file = new File(this._buffer, this._name, {
|
||||
type: this._mime,
|
||||
lastModified: new Date().getTime()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue