Using collective.quickupload with wildcard.media

classic Classic list List threaded Threaded
4 messages Options
aschmitz aschmitz
Reply | Threaded
Open this post in threaded view
|

Using collective.quickupload with wildcard.media

I've configured a server with Plone 4.3.3, collective.quickupload 1.6.5, and wildcard.media 1.2b5.  Through the ZMI > content_type_registry, I changed the major_minor for the video/ MIME type to the Video content type.  When I upload an MP4 video using a Quick Upload portlet, I get the following errors:

INFO collective.quickupload uploading file with XHR: filename=add-holding.mp4, title=Add holding, description=, content_type=video/mp4, portal_type=WildcardVideo
INFO collective.quickupload An error happens : the dexterity content type http://localhost/media/add-holding.mp4 has no file field, rawdata can't be created
ERROR collective.quickupload Error creating add-holding.mp4 file: list index out of range

I found the error message in dexterity.py of the collective.quickupload product.  It looks like the following code isn't finding any file fields in the video dexterity content type:

        file_fields = [field for name, field in fields
                       if INamedFileField.providedBy(field)
                       or INamedImageField.providedBy(field)]

Would it be possible to get collective.quickupload to support videos from wildcard.media with a few changes to one or both of these products?

Thanks,
Alan
Daniel Jowett Daniel Jowett
Reply | Threaded
Open this post in threaded view
|

Re: Using collective.quickupload with wildcard.media

Hi Alan,

  just guessing, (since you have no other replies), but would wildcard.foldercontents be a good substitute for collective.quickupload in your case?
I guess it would play more nicely with wildcard.media since it's from the same stable.

Regards,
Daniel


On 08/11/14 17:32, aschmitz wrote:
I've configured a server with Plone 4.3.3, collective.quickupload 1.6.5, and
wildcard.media 1.2b5.  Through the ZMI > content_type_registry, I changed
the major_minor for the video/ MIME type to the Video content type.  When I
upload an MP4 video using a Quick Upload portlet, I get the following
errors:

INFO collective.quickupload uploading file with XHR:
filename=add-holding.mp4, title=Add holding, description=,
content_type=video/mp4, portal_type=WildcardVideo
INFO collective.quickupload An error happens : the dexterity content type
http://localhost/media/add-holding.mp4 has no file field, rawdata can't be
created
ERROR collective.quickupload Error creating add-holding.mp4 file: list index
out of range

I found the error message in dexterity.py of the collective.quickupload
product.  It looks like the following code isn't finding any file fields in
the video dexterity content type:

        file_fields = [field for name, field in fields
                       if INamedFileField.providedBy(field)
                       or INamedImageField.providedBy(field)]

Would it be possible to get collective.quickupload to support videos from
wildcard.media with a few changes to one or both of these products?

Thanks,
Alan




--
View this message in context: http://plone.293351.n2.nabble.com/Using-collective-quickupload-with-wildcard-media-tp7572834.html
Sent from the General Questions mailing list archive at Nabble.com.

------------------------------------------------------------------------------
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users

--
Daniel Jowett

Jowett Enterprises Ltd
Tel: 0333 3 553 773
Mobile: 07870 667 126
[hidden email]
www.jowettenterprises.com

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
Nathan Van Gheem-3 Nathan Van Gheem-3
Reply | Threaded
Open this post in threaded view
|

Re: Using collective.quickupload with wildcard.media

I'm not sure. There are a couple things at work that might need to be tweaked in order for this to work.

- all uploader products need to be smarter and look at the mime type registry--I think it's on the todo list of wildcard.foldercontents(and it's equivalent in core)
- wildcard.media needs to register it's types correctly in the mime type registry. Again, I don't think this is happening.

I might have time to look at this as a lot of people are clamoring for it...

On Fri, Nov 14, 2014 at 5:12 AM, Daniel Jowett <[hidden email]> wrote:
Hi Alan,

  just guessing, (since you have no other replies), but would wildcard.foldercontents be a good substitute for collective.quickupload in your case?
I guess it would play more nicely with wildcard.media since it's from the same stable.

Regards,
Daniel



On 08/11/14 17:32, aschmitz wrote:
I've configured a server with Plone 4.3.3, collective.quickupload 1.6.5, and
wildcard.media 1.2b5.  Through the ZMI > content_type_registry, I changed
the major_minor for the video/ MIME type to the Video content type.  When I
upload an MP4 video using a Quick Upload portlet, I get the following
errors:

INFO collective.quickupload uploading file with XHR:
filename=add-holding.mp4, title=Add holding, description=,
content_type=video/mp4, portal_type=WildcardVideo
INFO collective.quickupload An error happens : the dexterity content type
http://localhost/media/add-holding.mp4 has no file field, rawdata can't be
created
ERROR collective.quickupload Error creating add-holding.mp4 file: list index
out of range

I found the error message in dexterity.py of the collective.quickupload
product.  It looks like the following code isn't finding any file fields in
the video dexterity content type:

        file_fields = [field for name, field in fields
                       if INamedFileField.providedBy(field)
                       or INamedImageField.providedBy(field)]

Would it be possible to get collective.quickupload to support videos from
wildcard.media with a few changes to one or both of these products?

Thanks,
Alan




--
View this message in context: http://plone.293351.n2.nabble.com/Using-collective-quickupload-with-wildcard-media-tp7572834.html
Sent from the General Questions mailing list archive at Nabble.com.

------------------------------------------------------------------------------
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users

--
Daniel Jowett

Jowett Enterprises Ltd
Tel: 0333 3 553 773
Mobile: 07870 667 126
[hidden email]
www.jowettenterprises.com

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users




--
Nathan Van Gheem
Solutions Architect
Wildcard Corp

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
aschmitz aschmitz
Reply | Threaded
Open this post in threaded view
|

Re: Using collective.quickupload with wildcard.media

Nathan Van Gheem-3 wrote
I'm not sure. There are a couple things at work that might need to be tweaked in order for this to work.

- all uploader products need to be smarter and look at the mime type registry--I think it's on the todo list of wildcard.foldercontents(and it's equivalent in core)
- wildcard.media needs to register it's types correctly in the mime type registry. Again, I don't think this is happening.

I might have time to look at this as a lot of people are clamoring for it...
I had some time to try a few more tests.  I changed the major_minor for the video/ MIME type to the Video content type through the ZMI > content_type_registry, and then I tried to upload an MPEG4 video with an mp4 extension.

When I used collective.quickupload, it created a video, but video file field was empty.  I got the errors listed in my previous post.

When I used wildcard.foldercontents, I got a file rather than a video .

When I used webdav or ftp to upload the file, I got a video and it was playable.  Unfortunately I couldn't save any changes to it.  On the edit form the video file field showed the type as plain text.  When I tried to save any changes to the video, I got a "must be a video file" error.

-Alan