P5.js-web-editor: File uploader bugs

Created on 21 Jul 2016  路  8Comments  路  Source: processing/p5.js-web-editor

In the current editor, I have begun to add media uploads. As this is a fairly complicated task, as it stands right now, it only works for:

  • jpg/jpeg, png, gif (single frame), and tif
  • If you put it in your JS files. Will not resolve media in HTML and CSS.
  • If you download the project as a zip, it will download the images.

Eventually you will be able to uploads fonts, videos, and so on, and will parse it in all file types, but for now, I think it's good enough for teaching basic p5.js.

Most helpful comment

just added support for font files: .tff and .otf, deployed.

All 8 comments

Next step: uploading text files! I think I'll need to add a file limit size, especially for files types like .json, which can be really big, and those will get uploaded to S3 rather than to the mongo database.

I'm making a note that I don't think SVG uploading is working. This isn't mentioned in the first comment, but I'm assuming it hasn't be attempted yet.

To add to the pile of files that students are trying to upload to the editor, I had one working with loadModel() this morning that wanted to upload an OBJ file.

I can handle this file types no problem! I just need to whitelist them.

Just tried adding SVG's but I couldn't get it to work because of processing/p5.js/#1648. Obj files are now working though and deployed.

just added support for font files: .tff and .otf, deployed.

The interface makes it feel like more than one file can be uploaded at a time, for example to load three images with one drag into the box, but only one is uploading at a time.

i'm going to close this--there's a separate ticket for the UX for the uploader being confusing (#271), and if there are bugs this ticket can be reopened.

Was this page helpful?
0 / 5 - 0 ratings