Currently FeedAPI/ParserCSV only support pulling CSV files from the web. It should also support a file upload.
| Comment | File | Size | Author |
|---|---|---|---|
| #20 | feedapi_file_upload_2.patch | 6.46 KB | aron novak |
| #19 | 405896_dont_blow_away_feedapi.patch | 1.41 KB | alex_b |
| #18 | feedapi_file_upload_1.patch | 6.19 KB | alex_b |
| #17 | feedapi_file_upload_1.patch | 6.04 KB | alex_b |
| #16 | feedapi_file_upload_1.patch | 3.1 KB | aron novak |
Comments
Comment #1
scottrigbyHi alex_b,
The path of the file upload can already be pasted into the Feed URL field. This could be added as an option on the node edit form, and present a select list of current file uploads for that node (then use the same back-end, using the URL from the selected file upload). What do you think?
Comment #2
alex_b commentedI think it should be a full fledged upload.
Adding the select list you're talking about is a very specific use case and easy to do in a custom module - I'd rather not wire it into the module.
Comment #3
alex_b commentedThis is actually a FeedAPI issue.
Comment #4
jweberg commentedsubscribe
I am using FlashVideo and need to upload files from feeds with this.
Comment #5
aron novakWait a second! FeedAPI is for handling feeds. It has nothing to do with local files.
However I can imagine such a module which is able to handle this transparently for you. A file upload popup form what copies the result url into the feedapi url field.
I do not think FeedAPI core should handle file uploads.
Comment #6
jweberg commentedMaybe it would fit in to the FeedAPI Element Mapper project though. To be able to take 'podcasts' and upload the media files to flashvideo or similar would be a great feature. I know that I need something like this for one of my sites now. I don't know if the mapper could incorporate this or not but I think it could have many uses.
Comment #7
scottrigbyNot a CSV Parser issue – since this module is specifically for parsing files?
Comment #8
alex_b commented#5:
I think there's a valid use cases where you'd like to load a feed from your local disk onto your web site. Think of CSV or iCal, think of testing or migration.
From this perspective, I think that file upload could live in FeedAPI core. But for argument's sake: Could such an upload feature live in an add-on module?
Comment #9
aron novakalex_b: It's not hard to imagine such an add-on module what provides a pop-up with a file upload only form and generates an URL from the uploaded file.
Comment #10
jweberg commentedI think alot of us were also thinking of uploading from podcasts and the such as well.
Comment #11
alex_b commentedThis can be an add on module (feedapi_fileupload) that adds an upload field next to the url field on the form. On submission, it uploads the file to Drupal's file directory and sticks the URL to the file onto $node->feed->url .
Comment #12
aron novakComment #13
aron novakComment #14
alex_b commentedHi Aron - just had a look. This is a funny brief module :-)
It's functional, but I'd like to suggest a more solid approach:
* Create a separate upload field, don't hijack file attachments.
* Don't rely on JavaScript.
* Embed upload field right under the URL field (see attachment).
* Roll as a patch to FeedAPI. I think we should include it in the package.
Comment #15
aron novakComment #16
aron novakThis version allows to replace existing URLs with upload also.
Comment #17
alex_b commentedLooking good. I added a setting on content type form for choosing whether to use file upload or not on a per content type basis.
Comment #18
alex_b commentedStores feeds in files/feeds/ .
Comment #19
alex_b commentedThere shouldn't be extra validation for whether a file is present. Like before, it should be still possible to submit a feed node without specifying a URL (this behavior is questionable, but let's not change it with this patch anyhow) - this is fixed.
Found another problem: upload does not work if attachments are not enabled on content type.
Comment #20
aron novakHere is a patch what makes the stuff work in every case (if upload module is disabled, for example)
Comment #21
aron novakComment #22
aron novak