Comments (5)
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.
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.
@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.
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.
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)
- Photo information not readed HOT 2
- Not support for TEL;TYPE=WhatsApp: HOT 4
- CHARSETS not handled correctly HOT 6
- Wrong Label Parameter for Address HOT 1
- [Not a Bug] URLs serialization in vcard 3.0 only serialize the first URL HOT 1
- [Bug] NonStandardProperty not working
- [Feature Request] UID parsing fails for values others than UUIDs 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 vcards.