The newly-added ability for any user uploading a file to change the storage is extremely problematic for us. We do not want users changing the default storage specified in the field settings, that would let them mistakenly store sensitive documents publicly and potentially open the company to considerable liability.
The same applies to any other steps that allow the user to change defaults. We just want step 1 ;-)
Please provide a simple way to skip each step of the form after step 1. A permission per step would be ideal, but if that would result in too many permissions, a hook would be welcome.
Comments
Comment #1
John Pitcairn CreditAttribution: John Pitcairn commentedI think if this were permission-based you'd possibly need a separate permission per-filetype and per-step, which really would result in far too many permissions?
Comment #2
Devin Carlson CreditAttribution: Devin Carlson commentedMarked #1997898: Disable Destination step for better UX as a duplicate.
Comment #3
Anonymous (not verified) CreditAttribution: Anonymous commentedI can understand having the 'Destination' step (step 3) when adding a brand new file via file/add, but when adding a file via a field that already has that information defined, shouldn't there be a check for that in order to skip that step?
Comment #4
Elin Yordanov CreditAttribution: Elin Yordanov commentedI am also looking for a way to skip 'Destination' step, which makes the file uploads very cumbersome and unnecessarily complicated for users. Even if there are no permissions or something to skip those steps, I would appreciate any hints about to hide/skip those site-wide.
Thanks in advance!
Comment #5
Devin Carlson CreditAttribution: Devin Carlson commentedA patch to provide options for skipping each of the upload wizard steps. A description of what each step does and what happens if a certain step is skipped is included.
The default behaviour for skipping the file type selection step would be enhanced by #1920350: Provide a "catch all" default application file type.
Comment #6
John Pitcairn CreditAttribution: John Pitcairn commentedDoesn't apply against most recent dev snapshot:
Comment #7
avinoam CreditAttribution: avinoam commentedI applied it against the last dev version and it work well for me
Comment #8
Elin Yordanov CreditAttribution: Elin Yordanov commentedPatch on #5 has a little typo on 'Skip scheme selection' checkbox. The corrected patch is attached.
By the way many thanks to Devin Carlson for the patch!
Comment #9
Devin Carlson CreditAttribution: Devin Carlson commentedA reroll of #8 since #1994080: Previous Button not working from step 4 to step 1 in file_entity_add_upload form got in. It also uses FILE_TYPE_NONE for files which can't have their types automatically determined.
Comment #10
John Pitcairn CreditAttribution: John Pitcairn commentedApplied to July 22 dev and working, thanks.
Comment #11
aaron CreditAttribution: aaron commentedCommitted to http://drupalcode.org/project/file_entity.git/commit/5e12856.
Comment #12.0
(not verified) CreditAttribution: commentedRemoved link to unrelated issue
Comment #13
Sergey Filimonov CreditAttribution: Sergey Filimonov as a volunteer commentedNever mind, it's already in module.
Comment #14
Sergey Filimonov CreditAttribution: Sergey Filimonov as a volunteer commentedComment #15
dchampine CreditAttribution: dchampine commentedI was struggling with this issue even with the latest code. In my case I found the issue to be an invalid value for $trigger. The triggering_element #id was different.
Not sure how that #id gets set, but it may help a regular guy and a contributor to know that it could be different.
I discovered this by inserting dpm($trigger) and dpm($form_state) inside the file_entity_add_upload_submit() function. Comparing the value of $trigger to the values evaluated later in the function made it clear that the tests for skipping steps would never evaluate true.
original:
if (($form['#step'] == $step - 1 && $trigger == 'edit-next2') || ($form['#step'] == $step + 1 && $trigger == 'edit-previous')) {
modified (not sure if this is unique to my install, but it fixes things for me in the short term):
if (($form['#step'] == $step - 1 && $trigger == 'edit-next--2') || ($form['#step'] == $step + 1 && $trigger == 'edit-previous')) {
Comment #16
museumboy CreditAttribution: museumboy commentedIf the Allowed File Types is already selected in the field setting for the content-type why must this process ask again? This setting in the field manager sets what type of file can be uploaded, but does not set the file to that field-type. Why not?
Comment #17
igorik CreditAttribution: igorik as a volunteer commentedhello, I am curious - this feature is already included in media module?
I found there is on admin/config/media/file-settings
FILE UPLOAD WIZARD
Configure the steps available when uploading a new file.
Skip filetype selection.
Skip scheme selection.
Skip available fields.
it is this what is going here about, ot this patch #9 is adding some other simplicity?
Thank you
Igor
Comment #18
John Pitcairn CreditAttribution: John Pitcairn commented@igorik: Yes, and the issue is marked as fixed.
Comment #19
museumboy CreditAttribution: museumboy commentedDoes not work like it should. I have multiple file-types configured for a JPG mimetype.
In a content-type I define an image field and select the media browser. In the setting of that field I select one 'Allowed file types' that is acceptable for this field.
Upon adding a node of that content-type I may be able to skip the filetype selection in the upload wizard, but the filetype defaults to whatever Filetype is first on the list. It does not obey the rule I defined in the field setup.
Comment #20
John Pitcairn CreditAttribution: John Pitcairn commented@museumboy: That would be a bug then. Since this is now in the module, and this issue is closed, you would be best to file a new issue specifically for that bug.