Why won't web2py serve my .vcf file?

55 views
Skip to first unread message

tim spear

unread,
Nov 4, 2015, 3:58:14 PM11/4/15
to web2py-users

I'm trying to let users download a .vcf file (vCard).

I copied myfile.vcf to the static folder. When I try going to www.myapp.com/static/myfile.vcf I get "invalid request" while other files in the static folder ending .js or .ico get served fine. Any ideas why it doesn't like .vcf or how to fix it?


Thanks  [also asked on Stackoverflow]

Niphlod

unread,
Nov 5, 2015, 4:38:38 PM11/5/15
to web2py-users
just tried, everything works fine. are you using the default webserver ?

tim spear

unread,
Nov 5, 2015, 4:40:47 PM11/5/15
to web...@googlegroups.com
I think so - Apache I think. I'll double check the details. Ta.

--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/4FUQT-8Lu1U/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Anthony

unread,
Nov 5, 2015, 5:28:00 PM11/5/15
to web2py-users
What happens if you run web2py locally with its built-in server?
To unsubscribe from this group and all its topics, send an email to web2py+unsubscribe@googlegroups.com.

tim spear

unread,
Nov 6, 2015, 2:28:42 PM11/6/15
to web...@googlegroups.com
I tried it and it worked fine with the local server on my laptop. Maybe it's something to do with my Apache setup then I guess? Dunno.

To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/4FUQT-8Lu1U/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.

Anthony

unread,
Nov 6, 2015, 2:45:51 PM11/6/15
to web2py-users
On Friday, November 6, 2015 at 2:28:42 PM UTC-5, tim spear wrote:
I tried it and it worked fine with the local server on my laptop. Maybe it's something to do with my Apache setup then I guess? Dunno.

Do you have Apache configured to serve static files, or does web2py serve them? I think vcf is one of the default supported MIME types, but you might want to check the mime.types file.

Anthony

tim spear

unread,
Nov 6, 2015, 2:52:36 PM11/6/15
to web...@googlegroups.com
I've done some more experimenting and it seems it was not to do with the routing at all as I made another .vcf file and pasted some text in and that worked. 

It seems there was something about the file content that my system did not like. The file I had issues with was downloaded from http://vcardmaker.com/.  Goodness knows what the issue was. Thanks for your help.


--

Dave S

unread,
Nov 6, 2015, 3:37:04 PM11/6/15
to web2py-users


On Friday, November 6, 2015 at 11:52:36 AM UTC-8, tim spear wrote:
I've done some more experimenting and it seems it was not to do with the routing at all as I made another .vcf file and pasted some text in and that worked. 

It seems there was something about the file content that my system did not like. The file I had issues with was downloaded from http://vcardmaker.com/.  Goodness knows what the issue was. Thanks for your help.


This reminds of the Days Back When: I used to be able hand-carve VCal files; it  was a pretty simple format; ical is basically the same.  Editor macros helped.

Glad you got things back on track, and thanks for the report back.

/dps

Reply all
Reply to author
Forward
0 new messages