Skip to content

Allow the upload for plain text - #1926

Merged
davivel merged 7 commits into
owncloud:masterfrom
MarioNoll:upload-plain-text
Apr 4, 2017
Merged

davivel merged 7 commits into
owncloud:masterfrom
MarioNoll:upload-plain-text

Conversation

@MarioNoll

@MarioNoll MarioNoll commented Mar 26, 2017 •

Copy link
Copy Markdown
Contributor

Related to #1647


BUGS & IMPROVEMENTS

@mention-bot

Copy link
Copy Markdown

@cinnamonsalt, thanks for your PR! By analyzing the history of the files in this pull request, we identified @malkomich, @davivel and @tobiasKaminsky to be potential reviewers.

@CLAassistant

CLAassistant commented Mar 26, 2017 •

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ MarioNoll
❌ Mario


Mario seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@MarioNoll MarioNoll mentioned this pull request Mar 26, 2017
@davigonz
davigonz self-requested a review March 27, 2017 09:24
@davigonz

Copy link
Copy Markdown
Contributor

Improvement

Steps

  1. Open a text editor
  2. Write some text, long press on it and select share with ownCloud.
  3. Select the target folder and press the upload button.
  4. A dialog is shown to insert the file name. In this dialog, delete ".txt" and press upload button.

Current behaviour

An error message is shown saying: "No file to upload. Received data do not include any valid file.

Expected behaviour

A specific error message is shown, giving information like: "You cannot upload the file without the .txt extension" and showing again the dialog to insert the file name.

Tested with Nexus 6P v7.0

CC @cinnamonsalt

@davigonz

davigonz commented Mar 29, 2017 •

Copy link
Copy Markdown
Contributor

I've reviewed your PR and tested your contribution @cinnamonsalt. Apart from the improvement I've added above, it looks good for me.

When you have the improvement ready, please rebase with master, ping me and the next step will be passing QA. After that, your contribution may be included in the next release, 2.4.0.

@davigonz

davigonz commented Mar 30, 2017 •

Copy link
Copy Markdown
Contributor

Thank you for adding the improvement @cinnamonsalt, could you please rebase with master to fix the out-of-date? After that, we will start with QA process

@jesmrec

jesmrec commented Mar 30, 2017 •

Copy link
Copy Markdown
Member

@cinnamonsalt you are allowing to upload to oC with no control about the file extension, also is allowed without extension. I can set "file.pdf" as filename, and oC will show this file as pdf. I think that the plain text should be forced to be saved in files with .txt extension (or another plain text format). The best way is adding the extension after the user types the filename, and before queuing it

@davigonz suggested you to set this control when no extension is set in the filename, his approach is also interesting to take in account

@jesmrec

jesmrec commented Mar 30, 2017 •

Copy link
Copy Markdown
Member

Improvement

When the dialog to input the file name is shown, it would be cool that the soft keyboard appears as well to avoid the user tapping on the screen exactly on the cursor position (sometimes it is not easy to accurate with the exact cursor position, depending on how thick are your fingers 😉 ) to start to type. The same behaviour, for example, when a file is renamed.

@cinnamonsalt

NOTE: this behaviour only happens in phones, in tablets the keyboard is shown.

@jesmrec

jesmrec commented Mar 30, 2017

Copy link
Copy Markdown
Member

@cinnamonsalt @davigonz @davivel

the file name is being requested after selecting the target with the folder picker. What do you think about asking for it before than the upload target?

@jesmrec

jesmrec commented Mar 30, 2017

Copy link
Copy Markdown
Member

I have realised that the limit for the shared text is 29K. Is this limit a system limitation?

@MarioNoll

Copy link
Copy Markdown
Contributor Author

@jesmrec

Great suggestions for improvements i will look into them as soon as i have time.
Personally i prefer to enter the filename after selecting a folder.

@davigonz

davigonz commented Mar 31, 2017 •

Copy link
Copy Markdown
Contributor

@jesmrec , @davivel

the file name is being requested after selecting the target with the folder picker. What do you think about asking for it before than the upload target?

Personally, I would request the name after selecting the target folder, just like @cinnamonsalt has already implemented it because, in the way you suggest, you could write a file name and after that, select a folder where there is already a file with the same name. By selecting the target folder before, you can select the file name accurately.

@MarioNoll

Copy link
Copy Markdown
Contributor Author

@jesmrec

I have realised that the limit for the shared text is 29K. Is this limit a system limitation?

I tried sharing text up to 60K without problems.

@jesmrec

jesmrec commented Apr 3, 2017

Copy link
Copy Markdown
Member

@cinnamonsalt thank you very much for your contribution. All bugs and improvements are fixed.

Approved

CC @davigonz @davivel

@davivel

davivel commented Apr 3, 2017

Copy link
Copy Markdown
Contributor

@cinnamonsalt , could you rebase your branch on master to make it up-to-date so that can be merged? Thank you so much :)

@davivel

davivel commented Apr 4, 2017

Copy link
Copy Markdown
Contributor

Works for me, though in general we prefer git rebase to git merge.

Thanks a lot!

@davivel
davivel merged commit d0767d1 into owncloud:master Apr 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants