Closed (fixed)
Project:
D7 Media
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
25 May 2012 at 14:38 UTC
Updated:
21 Nov 2021 at 06:19 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dave reidI think just doing this might be the trick:
Not sure about this vs using a form_alter though.
Comment #2
dave reidLooking at http://drupalcode.org/project/media.git/commitdiff/453fad5368c86a89c2baa..., it appears we also lost support for media_variable_get('max_filesize') as well.
Comment #3
dave reidThis is now fixed for the extension list with http://drupalcode.org/project/media.git/commit/2666215 in 7.x-2.x.
Comment #4
Ralf Eisler commentedfile/add/upload in 7.x-2.0-unstable5+1-dev still does not match the allowed file extensions from the media browser settings and is only allowing file extensions from file_save_upload().
Comment #5
dave reidMake sure to update both Media and File entity to their latest versions.
Comment #6
Ralf Eisler commentedOkay, I changed File entity from 7.x-2.0-unstable5 to 7.x-2.x-dev.
Under the upload form file/add I still get "Files must be less than 8 MB. Allowed file types: jpg jpeg gif png txt doc xls pdf ppt pps odt ods odp."
Now, the files for a single or a multiple uplodad can be selected and they appear in the upload form. When I click Start upload the upload is indicated with the green upload bar. After the upload seems to be completed, I get the message "Only files with the following extensions are allowed: jpg jpeg gif png txt doc xls pdf ppt pps odt ods odp." –– And the files aren’t uploded.
Comment #7
bensnyder commentedI can upload images from a wysiwyg and an image field with media widget, but I cant upload from /file/add. Using latest file_entity and media 2.x devs.
Comment #8
bensnyder commentedDave -- I'm checking apache error logs and drupal's logs but can't find the root of the problem. Do you have any suggestions for testing this? I can't upload anything from file/add.
It's supposed to be adding the image to /sites/default/files/media but it's uploading to /sites/default/files/. Odd...
Comment #9
bensnyder commentedAlso, the file never actually gets uploaded.
Comment #10
dave reid@bensnyder: Did you actually hit 'Submit' on that form after upload? Also, uploading on file/add will only upload to your site's root file directory since you're not uploading as a field which has a configured upload sub-directory.
Comment #11
bensnyder commentedDave -- lol yes I hit submit :)
Here's some new stuff from the event logger:
Comment #12
bensnyder commentedHere is the contents of http://[site]/file/ajax/upload/form-P6FHX3QMI-6fOgcUDczumNxAf_U3B4mbF49-0Kr0woQ:
Comment #13
dave reidHrm, I'm thinking that the server permissions are not properly set on your public files directory, ensuring that the web server can actually write to it, if drupal_chmod() is failing (which is where that error comes from). I think we need to move this to a separate issue since the problem isn't actually that we can't upload files, it's that permissions aren't set correctly, which is unrelated to being able to use this form.
Comment #14
bensnyder commentedDave - thanks for the reply. It can't be file system permissions... I know for sure I have that set correctly. I'm doing more digging tonight - I'll post back my findings. Thanks!
Comment #15
bensnyder commentedFinally found a [temporary] fix!
http://drupal.org/node/1337684#comment-5241598
Thoughts, anyone?
Comment #16
acbramley commentedA similar form_alter hook is required for the file_entity_add_upload_multiple as well, see http://drupal.org/node/1599892#comment-6461000
Comment #17
gmclelland commentedThis could be related to #1894814: Allowed file extensions not set on file/add when multiform is enabled
Test the patch at #1894814-5: Allowed file extensions not set on file/add when multiform is enabled and see if it works for you.
Comment #19
joseph.olstadFixed, and issues marked as related have been fixed.
Thanks to @Dave Reid , and others.
Comment #22
gisleRemoved contents from spam attachments.