Add users by CSV - enforce browse for file button only accepts csv files

Bug #1262928 reported by Steven on 2013-12-20
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Low
Nigel Cunningham
1.10
Low
Nigel Cunningham
15.04
Low
Unassigned

Bug Description

As an admin I want to add some users by csv - When I CLICK the choose file button I see all of my file types in my newly opened window. What would be nice is for the user to only see and be allowed to load csv files. I had thought of this when I was trying to upload a csv file using my ipad which only gave me the option to upload an image or video.

I think this is an easy fix by using the ACCEPT attribute for the input tag for example <input type="file" accept="text/csv" />

This would also be the case when uploading groups and group members.

Changed in mahara:
status: New → Confirmed
importance: Undecided → Low
tags: added: bite-sized
Changed in mahara:
assignee: nobody → Nigel Cunningham (nigelc-g)
Changed in mahara:
status: Confirmed → In Progress
Eduardo (o-eduardo) wrote :

It worked in these browsers:
- Chrome Version 38.0.2125.101 (64-bit),
- Chromium Version 37.0.2062.94 running on Ubuntu 14.04
- IE 11 on Win7
- IE 10 on Win7
And the following browsers did not work which was expected (not all browsers support that attribute yet) :
- Firefox version 32
- IE 9 on win7
- IE 9 on win7.1

How to Test:

1. Log in as admin
2. Go to Administration → Users → Add users by CSV
3. Click on Browse... → A file selector window with only CSV file showing should be showing → Passed
4. Go to Groups → Add groups by CSV
5. Click on Browse... → A pop-up window with only CSV file showing should be showing → Passed
6. Go to Update group members by CSV
7. Click on Browse... → A pop-up window with only CSV file showing should be showing → Passed

Robert Lyon (robertl-9) on 2014-10-15
Changed in mahara:
status: In Progress → Fix Committed
milestone: none → 1.11.0

Reviewed: https://reviews.mahara.org/3493
Committed: http://gitorious.org/mahara/mahara/commit/b04999749325ba30ea8322d70e8863a4a2d90aa2
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit b04999749325ba30ea8322d70e8863a4a2d90aa2
Author: Nigel Cunningham <email address hidden>
Date: Thu Jul 17 16:03:44 2014 +1000

(Bug1262928) Add support for filtering upload file types.

Add support for having a CSV (or other file type) filter
in the File control generated by Pieforms, and use it for
the forms for uploading users, groups and group memberships.

Note that support for the accept attribute in browsers is
patchy. This will have no effect in the Chromium and Firefox
versions current at the time of preparation, but has been
successfully tested in Chrome.

Change-Id: Ib5cf42be4e054f31086e9db9cda15473e86df7a3
Signed-off-by: Nigel Cunningham <email address hidden>

Reviewed: https://reviews.mahara.org/3814
Committed: http://gitorious.org/mahara/mahara/commit/26baf93efdd053e219adfe3dd407747849a9df03
Submitter: Aaron Wells (<email address hidden>)
Branch: 1.10_STABLE

commit 26baf93efdd053e219adfe3dd407747849a9df03
Author: Nigel Cunningham <email address hidden>
Date: Thu Jul 17 16:03:44 2014 +1000

(Bug1262928) Add support for filtering upload file types.

Add support for having a CSV (or other file type) filter
in the File control generated by Pieforms, and use it for
the forms for uploading users, groups and group memberships.

Note that support for the accept attribute in browsers is
patchy. This will have no effect in the Chromium and Firefox
versions current at the time of preparation, but has been
successfully tested in Chrome.

Change-Id: Ib5cf42be4e054f31086e9db9cda15473e86df7a3
Signed-off-by: Nigel Cunningham <email address hidden>

Robert Lyon (robertl-9) on 2015-04-17
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers