Discuss Scratch

UserBlockedYou
Scratcher
41 posts

file block

(file::sensing)
8to16
Scratcher
1000+ posts

file block

what would this do? there's nothing that suggests even a single change to the value.

Last edited by 8to16 (Oct. 12, 2024 09:03:10)

UserBlockedYou
Scratcher
41 posts

file block

8to16 wrote:

what would this do? there's nothing that suggests even a single change to the value.
ask for file with question [] and wait::sensing
breakfast_for_dinner
Scratcher
1000+ posts

file block

what if somebody tried uploading a file that's not utf-8 encoded
DifferentDance8
Scratcher
1000+ posts

file block

breakfast_for_dinner wrote:

what if somebody tried uploading a file that's not utf-8 encoded
It would use Unicode, just like the rest of the website
breakfast_for_dinner
Scratcher
1000+ posts

file block

DifferentDance8 wrote:

(#5)
It would use Unicode, just like the rest of the website
but i mean like what if somebody uploaded a binary file or like a png file or something

Last edited by breakfast_for_dinner (Oct. 13, 2024 08:32:17)

scratchcode1_2_3
Scratcher
1000+ posts

file block

breakfast_for_dinner wrote:

(#6)

DifferentDance8 wrote:

(#5)
It would use Unicode, just like the rest of the website
but i mean like what of somebody uploaded a binary file or like a png file or something
what if someone imported an audio file or a .mp4 or a .sb3 or a comically large zip file containing 5 terabytes of scratch cat images
basically what would it do for anything other than text
and how would this be useful
DifferentDance8
Scratcher
1000+ posts

file block

scratchcode1_2_3 wrote:

and how would this be useful
more turing completenesss?
breakfast_for_dinner
Scratcher
1000+ posts

file block

DifferentDance8 wrote:

(#8)
more turing completenesss?
i don't think “turing completeness” is a percentage. it either is, or isn't. this wouldn't make scratch “more turing complete,” it already is
BigNate469
Scratcher
1000+ posts

file block

breakfast_for_dinner wrote:

DifferentDance8 wrote:

(#5)
It would use Unicode, just like the rest of the website
but i mean like what if somebody uploaded a binary file or like a png file or something
https://developer.mozilla.org/en-US/docs/Web/API/FileReader

Anyways, why?
Sir-Cats-A-Lot
Scratcher
28 posts

file block

I think a better way to do this would be:

file [] exists?::boolean
create file called []
set [] contents to []
contents of []::reporter

It could be used to store save data on a device (would require allowing Scratch to download files) like so:

when gf clicked
if <not <file [save_data] exists?>> then
create file called [save_data]
wait until <(timer)>[0.1]>
set [save_data] contents to (join(join(length of(health))(health))(join(length of(score))(score))
when gf clicked
forever
reset timer
It should be restricted to PDF files to prevent abuse and certain images being downloaded via making files. If support for downloading images is allowed, restrict it to existing costumes in the project to prevent abuse and so that bad images are detectable.

Last edited by Sir-Cats-A-Lot (Oct. 15, 2024 10:38:58)

MagicCoder330
Scratcher
1000+ posts

file block

Sir-Cats-A-Lot wrote:

(…)
It should be restricted to PDF files to prevent abuse and certain images being downloaded via making files. If support for downloading images is allowed, restrict it to existing costumes in the project to prevent abuse and so that bad images are detectable.
mom why did the computer download 400000 pdfs with the word fart in them

Last edited by MagicCoder330 (Oct. 15, 2024 21:50:27)

Paddle2See
Scratch Team
1000+ posts

file block

My understanding is that file operations were intentionally left out of Scratch for security reasons. So I doubt if this would be implemented.

Powered by DjangoBB