Skip to main content
edited tags
Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284
Source Link
kha
  • 56
  • 5

amazons3-7-x-2.0, Multiple upload to S3, #upload_location wrong URI

I installed the brand new amazons3-7.x-2.0 published last week, and the process is not straightforward.

I finally managed to have it works, and I have the CCK file field, with a typical remote #upload location URI : s3://[bucketname]/[subdirectory].

On the node form, the first file I upload works fine. It monitored the file_managed_file_save_upload($element) function, which is called with the proper argument (remote URI): $element['#upload_location']=s3://[bucketname]/[subdirectory] .

But when I click on "add new file" and select another file, the file_managed_file_save_upload function is called with a wrong #upload_location : $element[#upload_location']= s3://[subdirectory]

The upload then failed with the following message : "The file could not be uploaded.".

In order to get amazons3 module to work with this long awaited new release, I had to patch a lot of files with contributed patches fixing the exact same issue of bucketname in the URI.

Is somebody facing the same problem and found a solution ? I will try the plupload module see if it fixes the issue.