In getFile function in the FeedsEnclosure class the $destination argument for file_unmanaged_save_data is created as: "$destination/$filename", but destination in the case might be "public://" for example which results in a malformed uri. Here is a patch to fix this:

CommentFileSizeAuthor
#1 feeds-destination-uri-1515204-1.patch747 bytesgnucifer
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

gnucifer’s picture

franz’s picture

Priority: Minor » Normal
Status: Needs review » Needs work

I've searched for this bug for some time. It causes private files to be saved as private:///filename which renders them unaccessible.

However, the patch is not discernible to me. It looks like it would make the URI "private:/filename" which is not correct too, right? Should it append "//" instead of "/" ? Or maybe the proper way would be to keep the original "$destination/$filename" with the added clause before it?

franz’s picture

Status: Needs work » Reviewed & tested by the community

Sorry, I get it now, patch works well!

franz’s picture

Status: Reviewed & tested by the community » Fixed

Committed.

ninhtran’s picture

I think this is what is needed to find, thanks for shared! in ao thun

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

inaccuracy