Code Monkey home page Code Monkey logo

uptpy's People

Contributors

ewerybody avatar

Watchers

 avatar

uptpy's Issues

add deletes checker post process

One of the downsides of the manifest file thing is:
If its listed in there its considered to be actually there!

If something that was uploaded by us, enlisted in the manifest is somehow removed on the target we'll still think it's there because we never do another remote scan.

We could mitigate such deletions (and changes that alter the size) with a post upload check.
This would still make the upload available asap AND fix these issues a moment later.

encoding problems with directory listing

Oh my. So I once thought (early 2022 when I built this) I have issues with some non ASCII file names.
So now I added a test that puts 🤗 into a name and Voilà it worked! I thought it's all good until I performed a scan on some other FTP space than the test area.
Turns out you can set the encoding on the ftplib FTP object and these emojis and stuff work no problem!

But when you have an é in a name:

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xeb in position 868: invalid continuation byte

But all good1! These can be remidied changing the encoding to latin-1. Yes? :D
Yes. But then emojies no longer work! 😫

https://stackoverflow.com/q/77089678/469322

solution

Honestly I don't know how we would solve this completely now.

A 1st step: Less directory listing!
I already modified our mkdirs function no so that it no longer looks up the parent dir of each part of the directory to be created to check for already existing.
Now It just fires the mkd and catches ftplib.error_perm with error code 550. This code is not specifically for "already exists" but close enough. And its faster as well!
Listing for each part of the path is rather expensive.

So under normal circumstances we no longer do directory listing at all on the FTP! 🙌
But we can! Maybe we should drop the option entirely. But then we'd still need a unittest that verifies that update still works with weird file names.

For kicks I just created a file named tëstfilé🤗.txt to trip off ANY encoding :D
When uploading it with WinSCP it turned into tëstfilé??.txt on the server and when copying back tëstfilé%3F%3F.txt
so not event THEY have it solved!

RENAME.me

I added uppy to a HUGO site on May 23, 2022 but didn't think of creating the actual project yet :|
DARN. Now meanwhile there is an uppy on pypi since Jan 9, 2023 Github here

Let's give it another name then. What about

  • uptpy (like "Up tee pie")
  • uppi (would have the same ring)
  • uppie
  • effteepie (🍰! "ftpy" is taken)
  • ...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.