GithubHelp home page GithubHelp logo

Uploaded text downloads as STDIN about goploader HOT 8 OPEN

rka avatar rka commented on May 29, 2024
Uploaded text downloads as STDIN

from goploader.

Comments (8)

Depado avatar Depado commented on May 29, 2024 1

Hi,
I'd have to think about the way to do that. I would have to add a field in the database so I know if it was a file or stdin, because right now there is no differentiation between those two.
I'll have a look in an hour or so 👍

from goploader.

Depado avatar Depado commented on May 29, 2024 1

Yes I think. Just as when you upload from the command line, as there is no way for me to determine the name of the file you're trying to upload (since it's not a file but a stream), I name it stdin.

from goploader.

Depado avatar Depado commented on May 29, 2024

Just so I can get some clarification : You never want to display the file in browser ? Always download ? Or is that some special case for just files uploaded from stdin ?
Because there's already a always_download setting that allows to never display the content in browser and always offer to download the file. Also if you don't want your file to be named "stdin", simply use the -n/--name flag using the client or curl -F name="myfile.txt" ... as shown in the docs about curl

from goploader.

rka avatar rka commented on May 29, 2024

I was talking about only the text upload when you write stuff in the field.

image

The new function where you can set how it will display it is awesome btw (It could simply solve this one too) its just a little confusing when you can set those to file uploads too. (I can imagine users setting it to display a pdf as markup for example hence my other issue #58 )

I will check out what you wrote to #58 and try to add it like you explained (never programmed before :) )

from goploader.

Depado avatar Depado commented on May 29, 2024

Maybe I could just add an option in the upload form to say "this is a file named xxx and I never want it to be displayed in the browser" ? In such a case, I could add a field in the database and prevent the formatting (syntax highlighting, line numbers and theme) when the upload is completed and when the file is retrieved ?

I'll design a poc when I can and show it to you so you can validate if that fixes your use case 🤔

from goploader.

rka avatar rka commented on May 29, 2024

im not sure i understand. What i try to achieve is:

  • files would not be opened by browser (this works good when i set the always download option)

  • text uploaded would show in browser (with aweseome new functions :) )

Im sorry if i misunderstood you

from goploader.

Depado avatar Depado commented on May 29, 2024

Oh I see !
I don't know if that's possible as I have no way to know how the file was uploaded. I think I can just check for the filename and if it's stdin then show them in browser. But that would require that stdin is never changed, as soon as you give your file another name it would download. Sounds good ?

from goploader.

rka avatar rka commented on May 29, 2024

Oh i didnt know that.
So when i upload text (write stuff in the field like in the picture) it uploads as stdin?

Cool sounds gr8 :)

from goploader.

Related Issues (20)

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.