JoeGandy / ShareX-Custom-Upload

A little PHP script created for uploading custom sharex files to your own webserver
MIT License
166 stars 50 forks source link

Few things to add #76

Closed dotziph closed 4 years ago

dotziph commented 4 years ago

TL;DR: Calendar Search, Program Search, Zero Width links.

First of all I think the Search isn't really useful for finding something you uploaded maybe have it be a calendar that shows what you uploaded that day or have it be from one date to another. Secondly have a way to search what program was used which can be done by what is received from ShareX and taking that first part of the name (example chrome_Esf8S93qPS.png would be Chrome). Lastly something like this but for the image link. Maybe True/False or 1 2 3 for the different types of naming schemes.

JoeGandy commented 4 years ago

You can choose what to name files by passing it into the name parameter on shareX, I use %h.%mi.%s-%d.%mo.%yy as i like clean dates,

But you could use anything thats available from shareX?

JoeGandy commented 4 years ago

You're right about the search, especially if you use timestamp filenames, its basically useless

dotziph commented 4 years ago

I use the %remoji{2} for uploading so the file names can be many. I just would like something like that to be an option in the php so you can have it upload with the app name and time data or something like that.

theaquarium commented 4 years ago

First of all I think the Search isn't really useful for finding something you uploaded maybe have it be a calendar that shows what you uploaded that day or have it be from one date to another.

About calendar search, you can currently type dates into the search bar, since the search searches all column. This works fine, but maybe adding a calendar could work. The only problem is that the DataTable implementation isn't ours, and I'm not sure if there's a datatables.net date picker for search. Maybe this could work: https://makitweb.com/date-range-search-in-datatable-with-jquery-ajax-and-php/

Secondly have a way to search what program was used which can be done by what is received from ShareX and taking that first part of the name (example chrome_Esf8S93qPS.png would be Chrome).

Yeah, as you mentioned, ShareX already gives you a filename based on the program in which the screenshot was taken. In Version 2, you can choose to use the name ShareX sends for uploads and then just search for files with a certain program in the name. However, maybe I'll look into extracting that part of the name and saving it as some sort of metadata. The only thing I'm not sure about is whether ShareX includes that for all screenshots and I'll need to look into the file name format it uses.

Lastly something like this but for the image link. Maybe True/False or 1 2 3 for the different types of naming schemes.

Sure, this could work. Although, I personally disagree with hiding URLs, I understand that this is a useful feature and I'll look into how it's implemented to maybe add it as a config option.

I'm trying to think about how this could be done, and maybe one solution would be to have something like a JSON file that maps these random whitespace sequences to actual filenames, since I'm not sure if actually naming the files these things is a good idea. Potentially if I add it like this, I could also store other metadata like the app a screenshot was taken in like mentioned above.