ankitpokhrel
Repos
17
Followers
225
Following
53

🚀 A pure PHP server and client for the tus resumable upload protocol v1.0.0

1276
182

[EXPERIMENTAL] Facebook-like automatic alternative (alt) text for images using object detection with pre-trained model.

81
7

🔥 [WIP] Feature-rich interactive Jira command line.

2095
87

[WordPress Plugin] Dynamically adds multiple featured image (post thumbnail) functionality to posts, pages and custom post types. [850k+ downloads and 100k+ active installs]

101
34

A small utility to create archives while ignoring any hidden or unnecessary files. It uses git style pattern matching.

8
0

Events

pull request opened
fix: Option to show issues from all projects

Fixes #429

Created at 7 hours ago
create branch
ankitpokhrel create branch fix-sprint-issues-list
Created at 7 hours ago
closed issue
jira sprint list does not accept passing an arbitrary project string

Describe the bug

I'm using the default configuration file and my default project string is IDE

-p, --project string   Jira project to look into (defaults to /Users/myusername/.config/.jira/.config.yml)

This means whether or not I pass -pIDE to the jira sprint list commands it properly returns my items.

❯ jira sprint list -pIDE --current --plain --no-headers --paginate 1
Story	IDE-2581	Sanitized ticket title	Open

But now, if I change the project string to use something different, say DIS (which very much exists), then it fails.

❯ jira sprint list -pDIS --current --plain --no-headers --paginate 1

✗ No result found for given query in project "DIS"

However we can see below it very much exists when using another command, say jira issue list.

❯ jira issue list -pDIS --plain --no-headers --paginate 1
Epic	DIS-546	Another sanitized ticket title	Open

If I'm trying to query the API directly, we can see the active sprint in the DIS project exists.

❯ curl --request GET \
  -H "Authorization: Bearer $JIRA_API_TOKEN" \
  --url 'https://mydomain.com/rest/agile/1.0/sprint/7130/issue?jql=project=DIS'
{"expand":"schema,names","startAt":0,"maxResults":50,"total":16,"issues":[{"expand":"operations,versionedRepresentations,editmeta,changelog,renderedFields","id":"12355065
(snip)

Please provide following details

  1. JiraCLI Version:
    (Version="1.1.0", GitCommit="3b93e147eac468ad985bdece27469153b4bb2814", CommitDate="2022-08-14T08:10:40+00:00", GoVersion="go1.18.3", Compiler="gc", Platform="darwin/arm64")
    
  2. Are you using Jira cloud or on-premise jira server? Also mention the version for on-premise installation.
    Jira Server v8.20.10#820010-sha1:ace47f9
    
  3. What operating system are you using? Also mention version.
    macOS Monterey 12.5.1 (21G83)
    
  4. What terminal are you using? Also mention version.
    iTerm 2 Build 3.4.16
    

To Reproduce

Steps to reproduce the behavior:

See above.

Expected behavior jira sprint list -p<key> works as expected

Screenshots N/A

Additional context I did try to have a whitespace, e.g. -p DIS but it didn't make any difference.

Created at 1 day ago
issue comment
jira sprint list does not accept passing an arbitrary project string

Hi @anavarre, sprints do not relate to a project but the boards. jira issue list gets all sprint in the configured board. So the project filter won't do anything in this case.

Created at 1 day ago
issue comment
Unexpected response '404 Not Found' from jira.

I don't know much about that. Please check with your Jira administrator.

Created at 1 day ago
Created at 4 days ago
delete branch
ankitpokhrel delete branch ldblib
Created at 6 days ago

Ldblib (#39)

Created at 6 days ago
pull request closed
Ldblib

Relates to #27

Created at 6 days ago

Remove explicit typecast in return types

Created at 6 days ago

Remove typecast

Created at 6 days ago

Import libc deps

Use cstr macro

Created at 6 days ago
pull request opened
Ldblib

Relates to #27

Created at 6 days ago

Finish moving lmathlib, removing the C file (#14)

  • Finish moving lmathlib, removing the C file

  • cargo fmt

Move lauxlib into rust (#10)

  • Move lauxlib into rust

  • Fix buffonstack calculation

  • Add inline(always) as this was a macro

Loslib (#13)

  • Initial commit

  • loslib.rs refactoring

  • loslib.rs refactoring

  • Cargo fmt

  • libc imports

  • Move lapi to imports

  • import lauxlib

  • Fix up libc stuff

  • Move more types around

  • Fix a couple of types that are more strict

  • cargo fmt

Co-authored-by: Tomas Doran tdoran@yelp.com

Migrate lvm

lmathlib: Use native rust methods (#15)

Move the lexer to rust. (#32)

  • Move the lexer to rust.

Fixes #31

  • cargo fmt

Add LICENSE. (#33)

Fixes #30

Remove cfg-if since it causes issues with rust-analyzer

Port lbaselib.c to lbaselib.rs (#36)

Fixes #20

Port lgc

Rollback tests/db.lua

Update CI

Just remove lbitlib.c (#37)

Fixes #34

Enable address sanitizer without leak detector (yet) Fix buffer overflow in luaO_chunkid

Enable leak detector & fix few memleaks

Simplify README

Ldblib

Relates to #27

Created at 6 days ago
create branch
ankitpokhrel create branch ldblib
Created at 6 days ago
issue comment
Unexpected response '404 Not Found' from jira.

This has nothing to do with Jira Service Desk but it looks like you don't have agile add-on in your installation. The tool uses agile api for board, epic and sprints.

The init will fail at the moment if the API is not available. However, I think there should be a way to skip this when generating the config. I will see what I can do here.

Created at 1 week ago
reopened issue
Can't upload same name two different file.

can't upload same same two different file. Suppose i have one file name with test.mp4 and same name another file in different location. If i uploaded on and trying to upload another then it's showing as completed.

Created at 1 week ago
issue comment
Can't upload same name two different file.

@dipaksarkar The upload is determined by the Upload-Key which the client can pass in request header. A unique key is generated if this key is not available in the headers. I assume your client is sending same upload key if the filename is same. Could you check the Upload-Key header in your requests?

Created at 1 week ago
issue comment
File based cache - tus_php.server.cache empty - 410 Error

Hi @gianlucacuomo, it is not advised to use FileStore in production. FileStore was initially designed for development purposes and may not work properly in many cases. Please use redis or apcu cache in prod.

From your description it seems like the app is not able to write data to the cache. Default redis and file configuration for server and client can be found inside config/server.php and config/client.php respectively. To override default config you can simply copy the file to your preferred location and update the parameters. You then need to set the config before doing anything else.

\TusPhp\Config::set('<path to your config>');

$server = new \TusPhp\Tus\Server('redis');
Created at 1 week ago
closed issue
download file but its broken

i already implement upload tus php in my server, i got successfully, but when i want to download that file.. then i cant open the file (ex. image and xls file) size of file like before/origin file

Created at 1 week ago
issue comment
download file but its broken

Please use the issue template and provide as much details as possible when creating the issue. I won't be able to help much without proper details.

Created at 1 week ago
closed issue
Predis\Connection\ConnectionException

1、确定redis可以使用。 2、代码 $server = new \TusPhp\Tus\Server('redis');

$response = $server->serve(); #程序到这里,报错了 Predis\Connection\ConnectionException

$response->send();

exit(0); // 退出当前 PHP 进程

Created at 1 week ago
issue comment
Predis\Connection\ConnectionException

ConnectionException usually implies that the server cannot connect to the redis instance. Make sure that the connection details are set correctly. You can use REDIS_HOST, REDIS_PORT and REDIS_DB env in your server to override redis settings for both server and client.

Note: Please use the issue template with as much details as possible when creating a issue.

Created at 1 week ago
issue comment
Can't upload same name two different file.

The file are compared based on their hash value generated from their contents. So if you have the exact same file with different name it is still the same file.

Created at 1 week ago
closed issue
Can't upload same name two different file.

can't upload same same two different file. Suppose i have one file name with test.mp4 and same name another file in different location. If i uploaded on and trying to upload another then it's showing as completed.

Created at 1 week ago
issue comment
Upload fails when file name contains an apostrophe

This is related to #333

Current implementation doesn't allow following characters in filenames '../', '"', "'", '&', '/', '\\', '?', '#', ':', however this is not true for all systems and this should be configurable IMO.

As a workaround you can rename the file before uploading, for example with uppy:

onBeforeFileAdded: (currentFile, files) => {
    var modifiedFile = Object.assign({}, currentFile, {
        name: currentFile.name.replace(" ", "-") // clean spaces
    });
    uppy.info(modifiedFile);
    return modifiedFile;
}
Created at 1 week ago
issue comment
Cache file not working on windows

#383 is merged and is available in the new release v2.3.0

Created at 1 week ago
closed issue
Cache file not working on windows

When using the FileStore Cache on windows, the file can't be written due to the lock.

If i skip the lock or use LOCK_UN on the lock function and then use LOCK_EX on the put() call then it works

Thanks a lot

Notice:  file_put_contents(): write of 549 bytes failed with errno=13 Permission  denied in  C:\laragon\www\filmfest\vendor\ankitpokhrel\tus-php\src\Cache\FileStore.php  on line 191
--
1 | 0.0004 | 412504 | {main}(  ) | ...\index.php:0
2 | 0.0332 | 2608360 | TusPhp\Tus\Server->serve(  ) | ...\index.php:22
3 | 0.0332 | 2608840 | TusPhp\Tus\Server->handlePost(  ) | ...\Server.php:276
4 | 0.0773 | 5572976 | TusPhp\Cache\FileStore->set( $key = 'add7ddc4-12a0-4b60-b8ae-2efa5fc32d5f', $value = ['name'  => 'VID-20220325-WA0010 (1).mp4', 'size' => 3142632, 'offset'  => 0, 'checksum' => '', 'location' =>  'http://filmfest.test/uploads//add7ddc4-12a0-4b60-b8ae-2efa5fc32d5f',  'file_path' =>  'C:\\laragon\\www\\filmfest\\uploads\\files/VID-20220325-WA0010  (1).mp4', 'metadata' => ['name' => 'VID-20220325-WA0010 (1).mp4',  'type' => 'video/mp4', 'filetype' => 'video/mp4', 'filename' =>  'VID-20220325-WA0010 (1).mp4'], 'created_at' => 'Tue, 12 Apr 2022  10:22:20 GMT', 'expires_at' => 'Tue, 12 Apr 2022 11:22:20 GMT',  'upload_type' => 'normal'] ) | ...\Server.php:379
5 | 0.0787 | 5573832 | TusPhp\Cache\FileStore->lock( $path = 'C:\\laragon\\www\\filmfest\\uploads\\files.json', $type = 2, $cb = class  Closure { virtual $closure = "$this->TusPhp\Cache\{closure}", public  $static = ['cacheKey' =>  'tus:server:add7ddc4-12a0-4b60-b8ae-2efa5fc32d5f', 'cacheFile' =>  'C:\\laragon\\www\\filmfest\\uploads\\files.json', 'value' => [...]];  public $this = class TusPhp\Cache\FileStore { protected $cacheDir =  'C:\\laragon\\www\\filmfest\\uploads\\'; protected $cacheFile =  'files.json'; protected $ttl = 3600; protected $prefix = 'tus:server:'  }; public $parameter = ['$handle' => '<required>'] } ) | ...\FileStore.php:217
6 | 0.0789 | 5574208 | TusPhp\Cache\FileStore->TusPhp\Cache\{closure:C:\laragon\www\filmfest\vendor\ankitpokhrel\tus-php\src\Cache\FileStore.php:206-217}(  $handle = resource(143) of type (stream) ) | ...\FileStore.php:150
7 | 0.0792 | 5586920 | TusPhp\Cache\FileStore->put( $path = 'C:\\laragon\\www\\filmfest\\uploads\\files.json', $contents = '{"tus:server:add7ddc4-12a0-4b60-b8ae-2efa5fc32d5f":{"name":"VID-20220325-WA0010   (1).mp4","size":3142632,"offset":0,"checksum":"","location":"http:\\/\\/filmfest.test\\/uploads\\/\\/add7ddc4-12a0-4b60-b8ae-2efa5fc32d5f","file_path":"C:\\\\laragon\\\\www\\\\filmfest\\\\uploads\\\\files\\/VID-20220325-WA0010  (1).mp4","metadata":{"name":"VID-20220325-WA0010  (1).mp4","type":"video\\/mp4","filetype":"video\\/mp4","filename":"VID-20220325-WA0010  (1).mp4"},"created_at":"Tue, 12 Apr 2022 10:22:20 GMT","expires_at":"', $lock = 0 ) | ...\FileStore.php:216
8 | 0.0792 | 5586920 | file_put_contents( $filename = 'C:\\laragon\\www\\filmfest\\uploads\\files.json', $data = '{"tus:server:add7ddc4-12a0-4b60-b8ae-2efa5fc32d5f":{"name":"VID-20220325-WA0010   (1).mp4","size":3142632,"offset":0,"checksum":"","location":"http:\\/\\/filmfest.test\\/uploads\\/\\/add7ddc4-12a0-4b60-b8ae-2efa5fc32d5f","file_path":"C:\\\\laragon\\\\www\\\\filmfest\\\\uploads\\\\files\\/VID-20220325-WA0010  (1).mp4","metadata":{"name":"VID-20220325-WA0010  (1).mp4","type":"video\\/mp4","filetype":"video\\/mp4","filename":"VID-20220325-WA0010  (1).mp4"},"created_at":"Tue, 12 Apr 2022 10:22:20 GMT","expires_at":"', $flags = 0 ) | ...\FileStore.php:191

Warning:  file_put_contents(): Only -1 of 549 bytes written, possibly out of free  disk space in  C:\laragon\www\filmfest\vendor\ankitpokhrel\tus-php\src\Cache\FileStore.php  on line 191
--
1 | 0.0004 | 412504 | {main}(  ) | ...\index.php:0
2 | 0.0332 | 2608360 | TusPhp\Tus\Server->serve(  ) | ...\index.php:22
3 | 0.0332 | 2608840 | TusPhp\Tus\Server->handlePost(  ) | ...\Server.php:276
4 | 0.0773 | 5572976 | TusPhp\Cache\FileStore->set( $key = 'add7ddc4-12a0-4b60-b8ae-2efa5fc32d5f', $value = ['name'  => 'VID-20220325-WA0010 (1).mp4', 'size' => 3142632, 'offset'  => 0, 'checksum' => '', 'location' =>  'http://filmfest.test/uploads//add7ddc4-12a0-4b60-b8ae-2efa5fc32d5f',  'file_path' =>  'C:\\laragon\\www\\filmfest\\uploads\\files/VID-20220325-WA0010  (1).mp4', 'metadata' => ['name' => 'VID-20220325-WA0010 (1).mp4',  'type' => 'video/mp4', 'filetype' => 'video/mp4', 'filename' =>  'VID-20220325-WA0010 (1).mp4'], 'created_at' => 'Tue, 12 Apr 2022  10:22:20 GMT', 'expires_at' => 'Tue, 12 Apr 2022 11:22:20 GMT',  'upload_type' => 'normal'] ) | ...\Server.php:379
5 | 0.0787 | 5573832 | TusPhp\Cache\FileStore->lock( $path = 'C:\\laragon\\www\\filmfest\\uploads\\files.json', $type = 2, $cb = class  Closure { virtual $closure = "$this->TusPhp\Cache\{closure}", public  $static = ['cacheKey' =>  'tus:server:add7ddc4-12a0-4b60-b8ae-2efa5fc32d5f', 'cacheFile' =>  'C:\\laragon\\www\\filmfest\\uploads\\files.json', 'value' => [...]];  public $this = class TusPhp\Cache\FileStore { protected $cacheDir =  'C:\\laragon\\www\\filmfest\\uploads\\'; protected $cacheFile =  'files.json'; protected $ttl = 3600; protected $prefix = 'tus:server:'  }; public $parameter = ['$handle' => '<required>'] } ) | ...\FileStore.php:217
6 | 0.0789 | 5574208 | TusPhp\Cache\FileStore->TusPhp\Cache\{closure:C:\laragon\www\filmfest\vendor\ankitpokhrel\tus-php\src\Cache\FileStore.php:206-217}(  $handle = resource(143) of type (stream) ) | ...\FileStore.php:150
7 | 0.0792 | 5586920 | TusPhp\Cache\FileStore->put( $path = 'C:\\laragon\\www\\filmfest\\uploads\\files.json', $contents = '{"tus:server:add7ddc4-12a0-4b60-b8ae-2efa5fc32d5f":{"name":"VID-20220325-WA0010   (1).mp4","size":3142632,"offset":0,"checksum":"","location":"http:\\/\\/filmfest.test\\/uploads\\/\\/add7ddc4-12a0-4b60-b8ae-2efa5fc32d5f","file_path":"C:\\\\laragon\\\\www\\\\filmfest\\\\uploads\\\\files\\/VID-20220325-WA0010  (1).mp4","metadata":{"name":"VID-20220325-WA0010  (1).mp4","type":"video\\/mp4","filetype":"video\\/mp4","filename":"VID-20220325-WA0010  (1).mp4"},"created_at":"Tue, 12 Apr 2022 10:22:20 GMT","expires_at":"', $lock = 0 ) | ...\FileStore.php:216
8 | 0.0792 | 5586920 | file_put_contents( $filename = 'C:\\laragon\\www\\filmfest\\uploads\\files.json', $data = '{"tus:server:add7ddc4-12a0-4b60-b8ae-2efa5fc32d5f":{"name":"VID-20220325-WA0010   (1).mp4","size":3142632,"offset":0,"checksum":"","location":"http:\\/\\/filmfest.test\\/uploads\\/\\/add7ddc4-12a0-4b60-b8ae-2efa5fc32d5f","file_path":"C:\\\\laragon\\\\www\\\\filmfest\\\\uploads\\\\files\\/VID-20220325-WA0010  (1).mp4","metadata":{"name":"VID-20220325-WA0010  (1).mp4","type":"video\\/mp4","filetype":"video\\/mp4","filename":"VID-20220325-WA0010  (1).mp4"},"created_at":"Tue, 12 Apr 2022 10:22:20 GMT","expires_at":"', $flags = 0 ) | ...\FileStore.php:191
Created at 1 week ago
closed issue
Do you plan to release a v2.2.2 compatible with Predis v2 ?

Hello !

I'm using your awesome server on one of my project. Today I tried to upgrade the dependencies. We are using predis/predis on our side and we saw that we can't use v2 because tus-php last version is not compatible with it.

I saw that a change was merged in june to make the library compatible. Can you tag a new minor version ?

Thanks !

Created at 1 week ago
issue comment
Do you plan to release a v2.2.2 compatible with Predis v2 ?

Hi @shulard, new release is available now: v2.3.0

Created at 1 week ago