I am able to upload files but i cant download them with the link given in output #76

Open
opened 2022-12-23 18:12:14 +01:00 by DestroyerAce · 4 comments

Hi again
I am able to upload files to server but I cant retrieve/download them
the site keeps throwing this error
and url shortner is working so its just files
and thanks again

Process 41 stopped
* thread #1: tid = 41, 0x0000ffffb0ea0310, name = 'fhost'
    frame #0:
Process 41 stopped
* thread #8: tid = 41, 0x0000ffffb3f6e1a0 fhost`get(path='/home/ubuntu/upload/e5969de411f4aaaf2ccd9dcbbf0613047c4ea76b4ca098c8712e936a60859234') + 27 at fhost.c:139, name = 'fhost/responder', stop reason = invalid address (fault address: 0x30)
    frame #0: {3:#018x} fhost`get(path='/home/ubuntu/upload/e5969de411f4aaaf2ccd9dcbbf0613047c4ea76b4ca098c8712e936a60859234') + 27 at fhost.c:139
   136   get(SrvContext *ctx, const char *path)
   137   {
   138       StoredObj *obj = ctx->store->query(shurl_debase(path));
-> 139       switch (obj->type) {
   140           case ObjTypeFile:
   141               ctx->serve_file_id(obj->id);
   142               break;
(lldb) q
Hi again I am able to upload files to server but I cant retrieve/download them the site keeps throwing this error and url shortner is working so its just files and thanks again ``` Process 41 stopped * thread #1: tid = 41, 0x0000ffffb0ea0310, name = 'fhost' frame #0: Process 41 stopped * thread #8: tid = 41, 0x0000ffffb3f6e1a0 fhost`get(path='/home/ubuntu/upload/e5969de411f4aaaf2ccd9dcbbf0613047c4ea76b4ca098c8712e936a60859234') + 27 at fhost.c:139, name = 'fhost/responder', stop reason = invalid address (fault address: 0x30) frame #0: {3:#018x} fhost`get(path='/home/ubuntu/upload/e5969de411f4aaaf2ccd9dcbbf0613047c4ea76b4ca098c8712e936a60859234') + 27 at fhost.c:139 136 get(SrvContext *ctx, const char *path) 137 { 138 StoredObj *obj = ctx->store->query(shurl_debase(path)); -> 139 switch (obj->type) { 140 case ObjTypeFile: 141 ctx->serve_file_id(obj->id); 142 break; (lldb) q ```
Owner

That looks like you’ve configured 0x0 to use X-ACCEL-REDIRECT but your webserver is not set up to handle it.

That looks like you’ve configured 0x0 to use `X-ACCEL-REDIRECT` but your webserver is not set up to handle it.
Author

Hi sorry for late reply
there were somethings going on

So I do wanna use X-ACCEL-REDIRECT
I am using uwsgi to reverse proxy to my domain
here's what I've added to my nginx site config

    location /home/ubuntu/upload {
    root /home/ubuntu/upload;
    internal;
    }

to enable X-ACCEL-REDIRECT but as the above error says its not working(I've tried removing root line but still no progress)
I can send and download files when X-ACCEL-REDIRECT is off but cant use url shortner but opposite when X-ACCEL-REDIRECT is on.

Hi sorry for late reply there were somethings going on So I do wanna use `X-ACCEL-REDIRECT` I am using uwsgi to reverse proxy to my domain here's what I've added to my nginx site config ``` location /home/ubuntu/upload { root /home/ubuntu/upload; internal; } ``` to enable `X-ACCEL-REDIRECT` but as the above error says its not working(I've tried removing root line but still no progress) I can send and download files when `X-ACCEL-REDIRECT` is off but cant use url shortner but opposite when `X-ACCEL-REDIRECT` is on.
Owner

I believe in this case you’d have to set root /; (since if you’re using an absolute upload path, the path 0x0 passes to nginx is also absolute).

I believe in this case you’d have to set `root /;` (since if you’re using an absolute upload path, the path 0x0 passes to nginx is also absolute).
Author

I tried that still nothing
Tried relative paths too

I am thinking of running 2 0x0 instances on 2 subdomains now
one for files and other for url shortner

Btw thanks for creating 0x0.st and sharing it with everyone
(I will leave issue open for now if anyone got any other fix for it)

I tried that still nothing Tried relative paths too I am thinking of running 2 0x0 instances on 2 subdomains now one for files and other for url shortner Btw thanks for creating 0x0.st and sharing it with everyone (I will leave issue open for now if anyone got any other fix for it)
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: mia/0x0#76
No description provided.