Code Monkey home page Code Monkey logo

Comments (5)

FolkerKinzel avatar FolkerKinzel commented on September 7, 2024

Your photo is too large. You can reduce the size of your photo or (better) put your photo somewhere on the web and reference it with an URI.
The data model of the library is based on the vCard 4.0 format. This specifies that embedded data content should be an URI. That's why the DataUrl class is derived from the System.Uri class with its restriction of a maximum length of 65519 characters.
The main goal of this restriction is that vCards should be small files, because they are used, e.g., for CARDDAV. Imagine thousands of vCard files, each one larger than 100 MB - that would bring each server down. I don't want to be guilty for such things.
The DataUrl class is used for both - reading and writing. I will think over it to remove the length restriction for reading in a future version, but I think there should be at least one for writing.

from vcards.

usselite avatar usselite commented on September 7, 2024

Hi @FolkerKinzel I understand on why there's a limitation (agree of file size). In this case the VCF file was generated by Nextcloud itself (and choose a default photo). - There are no limitations in place on their end though.

Is there currently another way to retrieve the original contents or do I have to manually extract it?

from vcards.

usselite avatar usselite commented on September 7, 2024

@FolkerKinzel any chance that you will review this limit again?

Personally I believe that the library should not have such a limit build in, this is something the server should address (or maintainer). Or at least have some override for this.

from vcards.

FolkerKinzel avatar FolkerKinzel commented on September 7, 2024

Hi @usselite,
Version 6.0.0 won't have a size limit anymore. After thinking about it for a long time, I came to the same conclusion: The size restriction can better be done by the application, e.g., measuring the size of the VCF file before loading it. One reason for this is also that vCard 4.0 allows an unlimit number of embedded photos inside one vCard.
A preview of version 6.0.0 will be available on nuget soon. If you can't wait you can download the repository and compile it yourself in the meantime.

from vcards.

FolkerKinzel avatar FolkerKinzel commented on September 7, 2024

Hi @usselite,
Version 6.0.0-beta.1 is now available at nuget. This version fixes your issue. (The final release is coming soon.)

from vcards.

Related Issues (8)

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.