Closed (fixed)
Project:
Remote Stream Wrapper
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
29 Jul 2016 at 14:35 UTC
Updated:
19 Oct 2017 at 07:20 UTC
Jump to comment: Most recent
Comments
Comment #2
deviantintegral commentedComment #3
deviantintegral commentedWe should see if we can borrow the code we have for this from our internal project. The original idea behind that was that all of the upload widgets would also full @FieldWidget plugins, which would play nicely here.
Comment #4
stevectorIs there a publicly available widget that can be used with this module? I've enabled the module but I'm not sure what widget to use with it.
Comment #5
dave reid@stevector: Right now there's just the stream wrapper support from an API level. I'll post the progress I have for adding a form element for a remote managed file, which then can implemented as a field widget.
Comment #6
stevectorCool, thanks Dave Reid! I'm using this module in a Drupal 7 to 8 migration and I was able to get it working to the point that the remote file records are migrated in to Drupal 8 and processed by this module correctly. I can help on the field widget if that is not started/done.
I should write a blog post on how I got the migration working with a custom destination plugin. I also did my first overriding of a service to avoid doing HTTP HEAD requests for remote file size when the file size info is also in the migration source D7 database.
Comment #7
stevectorAre you at liberty to share the code from that internal project?
Comment #8
jaypanIs there any documentation on this? I'm comfortable working at a code level, but I don't know what it is I'm supposed to work with.
What I'm trying to do is use a remote file for file, so that I can use the audiofield module as the formatter.
Edit: I figured out what to do. For anyone else interested, you can programmatically create a File entity with the URI set to one of the stream wrappers provided by this module, then set that file entity as the target on your node or whatever entity you are working with:
Comment #9
legolasboThe Remote stream wrapper widget module provides a widget for both file and image fields. It currently only supports entering the URL, but will in time gain feature parity with core's upload widgets.
Please give it a go and let me know if you've got any issues with it.