Comments (8)
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.
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.
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.
I was talking about only the text upload when you write stuff in the field.
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.
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.
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.
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.
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)
- Protect upload with password HOT 5
- See uploaded files in the web client HOT 1
- Question: Using a database on another server HOT 1
- Caddyfile review HOT 2
- DEMAIN BOXE HOT 4
- DEMAIN BOXE HOT 3
- language and lines option HOT 2
- Installation error - cannot use "github.com/boltdb/bolt".Options literal HOT 5
- How can i make it support the format of SWF? HOT 3
- Cannot compile latest version from master HOT 2
- token : how tu use it HOT 1
- Serve from several domains HOT 4
- Uploading from a URL HOT 1
- [Feature request] Allow unlimited duration HOT 3
- gpldr.in? HOT 6
- Official Docker image HOT 1
- Server Downloads is broken HOT 2
- Failing to build using docker golang container HOT 7
- runtime error: invalid memory address or nil pointer dereference HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from goploader.