Comments (12)
It also does this for files from Filza (jailbreak app).
from flutternativedraganddrop.
I'm curious what happens when text is disabled in this scenario
At least for images on web and files from Filza File Manager, when both URL and Text is disabled it sends as the image/file. If either url or text is enabled, it gets received as text
Edit: I've confirmed its the same for iMessage
We should be able to fix this by checking if its a URL second to last, then checking if its a plain text very last.
URL is also incorrectly given DropDataType.text instead of url
else if (d['url'] != null) {
//add url
var url = d['url'] as String;
var dropData = DropData(type: DropDataType.text, dropText: url);
dropDataList.add(dropData);
}
Also, currently we are checking if text or url is allowed before performing the drop. We should not check that, we should only be checking for subtypes of files.
from flutternativedraganddrop.
from flutternativedraganddrop.
I think when a string is detected it should check if it starts with file:///var and then try and get the data from that file
from flutternativedraganddrop.
Might need to check if a drop item is a uiimage to fix this https://www.appcoda.com/drag-and-drop/
from flutternativedraganddrop.
I'm curious what happens when text is disabled in this scenario
from flutternativedraganddrop.
I think when a string is detected it should check if it starts with file:///var and then try and get the data from that file
I believe there is a file url UTI, maybe we can test if it is that type
from flutternativedraganddrop.
I'm curious what happens when text is disabled in this scenario
At least for images on web and files from Filza File Manager, when both URL and Text is disabled it sends as the image/file. If either url or text is enabled, it gets received as text
Edit: I've confirmed its the same for iMessage
from flutternativedraganddrop.
@getBoolean I fixed setting the url dropdatatype to url and switched around the url and Plain text to be the last ones. regarding your last comment, why shouldn't we check for text or url? If they only allow text or url why wouldn't we check for that?
from flutternativedraganddrop.
@getBoolean I fixed setting the url dropdatatype to url and switched around the url and Plain text to be the last ones. regarding your last comment, why shouldn't we check for text or url? If they only allow text or url why wouldn't we check for that?
We already have the is allowed boolean flag so we don't need to check again. Having those additional checks will mean it will won't be received when receive non allowed items is enabled.
I don't like it being sent as a text or url based on the position of the if else, maybe we can find a better solution for that. (Of course that's only the case if urls count as text to iOS, which idk)
from flutternativedraganddrop.
Right now having the file, then url, and then the text check has fixed the image issue completely
from flutternativedraganddrop.
I'll get rid of the shouldAllow text and urls
from flutternativedraganddrop.
Related Issues (6)
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 flutternativedraganddrop.