Closed shaunanoordin closed 8 years ago
Just to clarify the New Plan:
I'm taking a break from the zipping functionality for the moment; I may need to simply limit all downloads to 10000 items like before for the time being, while I figure out wtf is up with the file formats I'm getting back.
The individual functions are working fine, but since they tend to be rather interlocked in the supercomponents they exist in, I'm still trying to find an elegant way to package all those functions into a standalone SuperDownloadButton component.
zootester1
on production after doing a few Classifications on an Assignment) to know for sure, but...
New look
@simoneduca, this is ready for review when we're back next week! Woot!
On my screen
I'd recommend setting max-width: 75em
in .student-assignmentlist
Please add readOnly
to the input fields in the form of SuperDownloadButton
to suppress react warning Warning: Failed form propType: You provided a
valueprop to a form field without an
onChangehandler. This will render a read-only field. If the field should be mutable use
defaultValue. Otherwise, set either
onChangeor
readOnly. Check the render method of
SuperDownloadButton.
Update:
👍 Thanks for the feedback, @simoneduca!
LGTM 👍
Fixes #284
What?
How?
<a href="..." download>
or any app-level solution for forcing a Save As dialog to open, the AlternateDownloader sends the data to the EduAPI, which then echoes the data back as a server response full ofcontent-disposition: download this goddamn thing as a file
headers.<form>
that triggers the "old-fashioned" HTTP request that Safari needs.WARNING: it may be conceivable that, in the future, the amount of data that a user can query will grow even larger, exceeding the already generous upload limit, so we need to consider preemptively curbing the download size at the app level. Right now, the largest CSV file that can get echoed (uploaded-then-downloaded-again) is about 12MB in size, if the user requests for all aggregated results. I'm looking into zipping the content to reduce strain on the EduAPI.
@simoneduca, please feel free to review and comment on this, as I'm thinking of generalising the CSV download function into a component that can be used by Students>Assignments, not just Map Explorer.
@ali I just realised how ironic it is that it's so difficult to get a Safari going in Gorongosa.