Coder Social home page Coder Social logo

Comments (13)

getBoolean avatar getBoolean commented on May 26, 2024 1

I still think it has to do with the change you implemented making all data return as a file when datatype file is the only one set. I could be wrong but that's what my gut is telling me. We'll have to look into it further

Yes. I believe what is happening is that it doesn't get sent as text because of the shouldAllowText(). It should then be ignored but is instead sent as a file because of the isFile(item) which checks isDocument(item).

We can remove the isDocument(item) check inside isFile(item). Removing the isDocument will mean .numbers files from iCloud won't work, but we can find another solution for that.

As for the shouldAllow for text and url, that was accidentally left in after a revert commit. I'm not sure if we should remove it or not because I'm not sure if doing that will mean urls are categorized as text

That's my theory right now based off my memory. I can test it out later when I get home.

from flutternativedraganddrop.

alexrabin avatar alexrabin commented on May 26, 2024 1

@getBoolean Currently working on this. Don't remove the isDocument(item) I would prefer that to work then this issue. We'll figure a way around this problem

from flutternativedraganddrop.

alexrabin avatar alexrabin commented on May 26, 2024

Isn't that how it is supposed to behave? If file is an allowedDataType then all of the other data types will be enabled

from flutternativedraganddrop.

getBoolean avatar getBoolean commented on May 26, 2024

Isn't that how it is supposed to behave? If file is an allowedDataType then all of the other data types will be enabled

Not text file, just text. I would think plain text shouldn't be categorized as a file right?

from flutternativedraganddrop.

alexrabin avatar alexrabin commented on May 26, 2024

Isn't that how it is supposed to behave? If file is an allowedDataType then all of the other data types will be enabled

Not text file, just text. I would think plain text shouldn't be categorized as a file right?

I think if a file is a plaintext file then it is registered as a file. Plaintext should be categorized as text.

Didn't you make it so when only the file data type is enabled that like pdf files would register as the file datatype. Is this causing the text to be registered this way too?

from flutternativedraganddrop.

getBoolean avatar getBoolean commented on May 26, 2024

Isn't that how it is supposed to behave? If file is an allowedDataType then all of the other data types will be enabled

Not text file, just text. I would think plain text shouldn't be categorized as a file right?

I think if a file is a plaintext file then it is registered as a file. Plaintext should be categorized as text.

Didn't you make it so when only the file data type is enabled that like pdf files would register as the file datatype. Is this causing the text to be registered this way too?

Not a file, I mean when you select text from something like the notes app

from flutternativedraganddrop.

alexrabin avatar alexrabin commented on May 26, 2024

So you set the datatype as file and you dropped in text from the notes app and it registered as a file?

from flutternativedraganddrop.

getBoolean avatar getBoolean commented on May 26, 2024

So you set the datatype as file and you dropped in text from the notes app and it registered as a file?

Yes

from flutternativedraganddrop.

alexrabin avatar alexrabin commented on May 26, 2024

I still think it has to do with the change you implemented making all data return as a file when datatype file is the only one set. I could be wrong but that's what my gut is telling me. We'll have to look into it further

from flutternativedraganddrop.

alexrabin avatar alexrabin commented on May 26, 2024

@getBoolean Just want to confirm: when you set the only allowed data type to be a file and you drop a string, the string should return with a datatype of text correct?

from flutternativedraganddrop.

alexrabin avatar alexrabin commented on May 26, 2024

I was able to get text and urls to register as their types when only DropDataType.file is active:

else if isFile(item) && !item.itemProvider.canLoadObject(ofClass: NSURL.self)
&& !item.itemProvider.canLoadObject(ofClass: String.self){

...
}

from flutternativedraganddrop.

alexrabin avatar alexrabin commented on May 26, 2024

Fixed text from being dropped as a file in #9

from flutternativedraganddrop.

alexrabin avatar alexrabin commented on May 26, 2024

Fixed text data type of strings when file data type is files

from flutternativedraganddrop.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.