New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Seafile Support #1061
Added Seafile Support #1061
Conversation
added Seafile task - ShareX.UploadersLib/UploadersConfig.cs added Seafile configuration properties - ShareX.UploadersLib/Forms/UploadersConfigForm.resx ShareX.UploadersLib/Forms/UploadersConfigForm.Designer.cs ShareX.UploadersLib/Forms/UploadersConfigForm.cs added Seafile tab, settings, and relevant configuration & validation utilities - ShareX.UploadersLib/FileUploaders/Seafile.cs main Seafile controller class, watch out for the ShareURL class as it doesn't used shared http classes due to contentlength and postdata PUT constraints
Destination settings window not shows ShareX icon for some reason in your commit. When I return to previous commit it shows properly. But can't find what is wrong. Only thing I can't check is resx file because GitHub not shows comparison. So something could be wrong there must be caused it? |
Odd. I am done for the night I will look into it tomorrow (I am in UTC-5,
|
I just reverted your resx changes and indeed resx was causing it. This gonna be very complicated to fix too because can't even see full comparison. I wonder now is there anything else broken in resx :( |
All I did was add the Seafile icon to the resx. Could Git have corrupted
|
I found way to see all differences just add ".patch" to end of commit link. Edit: Fixed Icon from VS designer. Now gonna test uploading. |
I didn't change form icon, at least not intentionally. Sorry i caused you
|
I meant your commit changed. By the way API URL setting is very confusing, now how am I supposed to find that URL? Can't find anywhere in web site. How normal users supposed to find it?! Also people can't find Auth Token too because it is not looks connected with that group box in right side. So I don't think people can figure out how to fill these settings. |
Use auto complete URL. Should he /api2 on the end of the URL. I didn't
|
// | ||
// grpSeafileAccInfo | ||
// | ||
this.grpSeafileAccInfo.Controls.Add(this.myListView1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't find this myListView1 in UI.
Edit: It was outside of group box area therefore not visible and not used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was gonna say I didn't know what those were. I should have looked harder
for remnants like that.
On Oct 13, 2015 2:18 AM, "Jaex" notifications@github.com wrote:
In ShareX.UploadersLib/Forms/UploadersConfigForm.Designer.cs
#1061 (comment):
//
// txtSeafileUploadLocationRefresh
//
resources.ApplyResources(this.txtSeafileUploadLocationRefresh, "txtSeafileUploadLocationRefresh");
this.txtSeafileUploadLocationRefresh.Name = "txtSeafileUploadLocationRefresh";
this.txtSeafileUploadLocationRefresh.UseVisualStyleBackColor = true;
this.txtSeafileUploadLocationRefresh.Click += new System.EventHandler(this.txtSeafileUploadLocationRefresh_Click);
//
// lblSeafileSelectLibrary
//
resources.ApplyResources(this.lblSeafileSelectLibrary, "lblSeafileSelectLibrary");
this.lblSeafileSelectLibrary.Name = "lblSeafileSelectLibrary";
//
// grpSeafileAccInfo
//
this.grpSeafileAccInfo.Controls.Add(this.myListView1);
I can't find this in UI.
—
Reply to this email directly or view it on GitHub
https://github.com/ShareX/ShareX/pull/1061/files#r41830262.
Because you reading and replying my messages from email I bet you don't see my countless edits I keep doing after send messages. Gonna use dropdown control for API URL now. |
return; | ||
} | ||
txtSeafileAccInfoEmail.Text = SeafileCheckAccInfoResponse.email; | ||
txtSeafileAccInfoUsage.Text = HelpersLib.NumberExtensions.ToSizeString(SeafileCheckAccInfoResponse.usage).ToString() + " / " + HelpersLib.NumberExtensions.ToSizeString(SeafileCheckAccInfoResponse.total).ToString(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand why you used extensions like that in here. Not to mention you converted string to string there.
Extensions used like this: SeafileCheckAccInfoResponse.usage.ToSizeString()
I saw your past edit but not the ones before (just read them). Sorry. And
I used auto complete feature on the one control, guess it wasn't intuitive
enough.
|
libraryItem.SubItems.Add(HelpersLib.NumberExtensions.ToSizeString(SeafileLibrary.size)); | ||
if (SeafileLibrary.encrypted) | ||
{ | ||
ListViewItem.ListViewSubItem isEncrypt = libraryItem.SubItems.Add("\u221A"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sub item not used at all?
It does look better like that! Sorry I haven't used C# in a couple months And yeah messenger could work but I'm in bed replying to these emails from
|
Why days to expiration is 7 by default and I can't make it never expire? |
Upload is successful: https://seacloud.cc/f/b7ed3e3d63/ Now I must try to find way to use current Uploader methods for ShareFile method because it is currently very ugly. |
I wonder is it possible to get this direct link https://seacloud.cc/f/b7ed3e3d63/?raw=1 redirected from it. |
I fixed accept header issue it was not working properly when set in header. But still always getting: The remote server returned an error: (415) UNSUPPORTED MEDIA TYPE. Response: Edit: Finally made it work. This API is ridiculous. |
That's exactly what I was thinking. Why use PUT for a request that could have been handled easily with GET, and why the heck return variables in the header and not in JSON?! |
Did you missed my question? |
Could you repeat the question? |
|
Setting it to 0 should set it to never expire. The API didn't have enough info on the matter though, the 7 I just left as an arbitrary number. |
You can't set it to 0. Minimum is 1 you did. Also by default why anyone would want it to expire. |
By the way are you using Steam? For to be able to easily communicate. |
Should probably be an option to disable it then. BTW, expiration only applies to the shared link. If you upload a file to share, you generally don't want the link accessible indefinitely. The expiration doesn't effect the file at all, just the public share link. As for Steam, yeah: http://steamcommunity.com/id/zikeji/ |
I tested as much as I could find, for further testing others are open to downloading the experimental setup with Seafile support.
Download: https://seacloud.cc/f/71f961cd4c/