Page MenuHomePhabricator

Provide a way to upload a file in Phabricator if drag'n'drop is not available or not wanted
Closed, ResolvedPublic

Description

General use case :

I want to upload a file. But I cannot, or I don't want to, drag-and-drop a file.

Particular use cases :

A) No file manager

I do not use a file manager. So I cannot drag'n'drop files into the text areas (like adding a comment to a task, or writing this description).

Is there a way I can upload files to text areas without drag'n'drop (like a text input where I can enter the filename)?

B) Want or need to use a standard upload button

I have the need too for a simple dialog for uploading a file from the comment form.

At first, I was puzzled with not finding the "Browse..." button.
I used the drag-and-drop thing, but :

  1. In my case, it complicates things. I have to open a folder...
  2. It is not accessible. It cannot be done without mouse.
  3. In some Web browsers, it does not work.
  4. I have to discover it, or to guess it. In "full screen", the upload button is broken, so I don't know that I can drag-and-drop a file : T88998.

C) Mobile

Due to the reliance on drag and drop only image uploading on mobile is not possible.

Mobile upload is available via https://phabricator.wikimedia.org/file/upload/ but not while creating task or mockup item.

Notes :

Related request upstream: https://secure.phabricator.com/T5187 -- includes a patch from @matmarex at https://secure.phabricator.com/D11513

Upstream considers that mobile uploads and drag&drop on desktop are both covered at https://secure.phabricator.com/T5187

Details

Reference
fl271
TitleReferenceAuthorSource BranchDest Branch
Provide link when user without permissions tries to create projectrepos/phabricator/deployment!32aklapperT165192verboseProjCreationPermErrorwmf/stable
Customize query in GitLab

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

None of the workarounds listed here appear to help for getting the complicated security settings correct. I don't see an option for something like "Visible to anyone who can see Txxxx", which is what would be needed.

@Anomie

I'm sorry this is confusing. FWIW, if you upload a file to a specific task it will be set to viewable as you by default. It will also be linked to the task via association and the "punchthrough" mechanism of phabricator takes effect. In essence, if you can access an associated object you can access the object by necessity. This is how objects are grouped for access in this context.

Example, I dropped this file on this task:

programming-saving-time.png (700×700 px, 139 KB)

It shows visible by "me" only atm. Once I save this comment it should show association with this issue.

Details post attachment association:

Screen_Shot_2014-12-01_at_7.56.03_AM.png (152×979 px, 26 KB)

Screen_Shot_2014-12-01_at_7.58.43_AM.png (179×1 px, 28 KB)

If you can see this...you are demonstrating the needed functionality. Note, if you do not have security permissions to a file object it will not turn into a reference at all.

This all ^ probably needs better documentation for our use cases.

If you can see this...you are demonstrating the needed functionality. Note, if you do not have security permissions to a file object it will not turn into a reference at all.

So the punchthrough mechanism works even if you go to https://phabricator.wikimedia.org/file/upload/ then manually copy the F-number and wrap it like:

{F123}

(rather than drag-and-drop)?

I believe yes :). If you have initial view you can associate. This is how
phab handles edge permissions ATM -- as in the file has one ACL and the
issue has another and this is a sane way to meet the edges of the two
applications.

Since that works, good. Any chance we can get a link to https://phabricator.wikimedia.org/file/upload/ from somewhere useful, if the little "upload" button on the comment form here is going to continue to be useless?

PhabricatorApplicationsFiles

In T165#802684, @Qgil wrote:

PhabricatorApplicationsFiles

Four pages to click through is far from convenient.

If you have to upload files frequently, you can always add a text panel to your homepage with a direct link. See Dashboards.

Or you can use https://www.mediawiki.org/wiki/Phabricator/Help#Uploading_file_attachments

Nnemo renamed this task from Provide a way to upload a file if no drag'n'drop available to Provide a way to upload a file if drag'n'drop is not available or not wanted.Dec 9 2014, 2:05 PM
Nnemo reopened this task as Open.

I have the need too for a simple dialog for uploading a file from the comment form.

At first, I was puzzled with not finding the "Browse..." button.
I used the drag-and-drop thing, but :

  1. In my case, it complicates things. I have to open a folder...
  2. It is not accessible. It cannot be done without mouse.
  3. In some Web browsers, it does not work.
Qgil lowered the priority of this task from Low to Lowest.Dec 9 2014, 2:13 PM
Nnemo updated the task description. (Show Details)

The task T1026 is for mobile and for task creation and mockup creation.

The issue we have here is not limited to mobile neither to task creation.

It seems that the file drag-and-drop feature breaks standard drag-and-drop of text : T88990

In T165#818633, @Qgil wrote:

If you have to upload files frequently, you can always add a text panel to your homepage with a direct link. See Dashboards.

Or you can use https://www.mediawiki.org/wiki/Phabricator/Help#Uploading_file_attachments

Sorry, but that doesn't solve my/the problem really :/ See this use case:
I open phabricator on my mobile phone (just as an example) and click the create new task button/link. Now i can type my information assign a project and now i think about to add an image, too. So i have to think about:
a) Open a new tab, click through the entire phabricator navigation, upload a file and copy the image FXXX link into my text field, wrapping it with {} (think about how difficult it can be on a small touchscreen to wrap text between special signs, we have the same problem in MobileFrontend with wikitext, all users hate it, and they are right!)

b) Open a new tab and click the shortlink, upload a file and copy the image FXXX link into my text field, wrapping it with... (you understand, the same as above).

That all makes the process of creating a task on a mobile phone neither intuitive, nor efficient. No, there is a pretty useless button in the form which explains me very rarely how i can upload a file on a device which doesn't support this (only) explained way -> very confusing UI. Isn't it possible to open the file upload form, if i click on the upload form, and once a file is uploaded add the file number wrapped in {} to the text field (just as a nice feature)?

I think the expectation with the current interface is that people will attach stuff via email?

That seems even less intuitive, somehow.

Also, why would folks necessarily even have their email up at the same
time, especially on mobile and the like?

In T165#818633, @Qgil wrote:

If you have to upload files frequently, you can always add a text panel to your homepage with a direct link. See Dashboards.

Or you can use https://www.mediawiki.org/wiki/Phabricator/Help#Uploading_file_attachments

To attach a file when creating a task, I was using a heavy workaround, by the link to the help which is on the home page of phabricator.wikimedia.org

But now this workaround is broken.

Now, in this help www.mediawiki.org/wiki/Phabricator/Help, I go to "Creating a task": main article: "How to report a bug".

And, in this article:

  • The link for uploading a file is not given.
  • Only the non-working way with the "Upload" button is given.
  • Actually, no way at all is given for "uploading a file". Only "uploading a log file" and "uploading a screenshot" are handled.

By the way, the workaround was for attaching a file when creating a task, but what about attaching a file when writing a comment? A workaround is needed for this use case too.

Can the tool phabricator.wikimedia.org be improved so that it be possible and easy to attach a file in a task?

Or, at least, can the help be improved to bring a workaround?

Thank you.

Still no visible way to upload an image when creating a task on mobile. Very aggravating, as i use my iPad a lot when traveling and need to be able to post screenshots.

Who should I talk to about getting this actually fixed? Can we assign contracting money to pay the phab guys to review the patch?

We'll find out if we can get them to actually look at it. :) Or if someone can look at it on our end at least.

Note that the response from epriestly is basically to point at https://secure.phabricator.com/w/planning/ which starts with "pay us money for higher prioritization". I'm perfectly happy to allocate some contracting $ if that's what it takes to get broken stuff fixed, but I'll have to escalate to someone with a contracting budget.

Ok, @epriestley has confirmed that they can squeeze us in in a week or two for a custom job, estimating 1-2 hours at their standard $150/hr rate for a fresh patch, which I find quite reasonable for a fix like this.

I'll try to confirm which contracting budget I can pull from in the meantime (worst case I'd pay for this out of pocket as it's annoying the heck out of me ;)

@brion it's not out of the question to apply a patch locally either. Especially when it's an extra-annoying bug with an easy/straightforward fix.

It would be nice to find ways to maintain these types of things as extensions rather than forking the core but that isn't always possible.

@brion it's not out of the question to apply a patch locally either. Especially when it's an extra-annoying bug with an easy/straightforward fix.

It would be nice to find ways to maintain these types of things as extensions rather than forking the core but that isn't always possible.

Yep; maintaining a local patch or extension has a cost too though, so I'm happiest to get a fix in upstream when possible. :) We've confirmed the budget and are on the agenda, so all looks well so far...

@brion it's not out of the question to apply a patch locally either. Especially when it's an extra-annoying bug with an easy/straightforward fix.

Given that the patch I wrote has been available for a year and a half, I don't think you're saying this seriously. I can't think of a single situation where someone reported a UI problem with Phabricator and we ended up deploying a custom patch, even though it was requested (with patches) once or twice on other tasks.

@matmarex Ive tried your patch not sure what the epected to look like but currently I didn't find it to work.

Qgil renamed this task from Provide a way to upload a file if drag'n'drop is not available or not wanted to Provide a way to upload a file in Phabricator if drag'n'drop is not available or not wanted.May 13 2016, 10:19 AM

@brion it's not out of the question to apply a patch locally either. Especially when it's an extra-annoying bug with an easy/straightforward fix.

Given that the patch I wrote has been available for a year and a half, I don't think you're saying this seriously. I can't think of a single situation where someone reported a UI problem with Phabricator and we ended up deploying a custom patch, even though it was requested (with patches) once or twice on other tasks.

I have applied quite a few patches locally. I apologize for not prioritizing this one.

If something is a major problem that's impacting your effectiveness, speak up and it will get my attention. I'm essentially the only person maintaining phabricator for WMF and it's a big job. I also have many other responsibilities besides phabricator maintenance. So it's just a matter of finding the time and prioritizing. It isn't always obvious whether a patch is worth the effort and it's somewhat difficult to measure the benefits vs the costs of maintenance. The default has been to avoid patches that touch phabricator core code because of the likelihood of conflicts with upstream changes.

This is now fixed upstream: https://secure.phabricator.com/D15953 and should land in our instance after the next Phabricator Upgrade.

mmodell claimed this task.
Florian rescinded a token.
Florian awarded a token.