3
0
mirror of https://github.com/snipe/snipe-it.git synced 2026-02-04 12:35:35 +00:00

Added supplier file uploads

This commit is contained in:
snipe
2025-11-10 20:47:45 +00:00
parent e1d3714445
commit 34daffcdf4
7 changed files with 50 additions and 7 deletions

View File

@ -1348,7 +1348,7 @@ Route::group(['prefix' => 'v1', 'middleware' => ['api', 'api-throttle:api']], fu
'index'
]
)->name('api.files.index')
->where(['object_type' => 'accessories|audits|assets|components|consumables|hardware|licenses|locations|maintenances|models|users']);
->where(['object_type' => 'accessories|audits|assets|components|consumables|hardware|licenses|locations|maintenances|models|suppliers|users']);
// Get a file
Route::get('{object_type}/{id}/files/{file_id}',
@ -1357,7 +1357,7 @@ Route::group(['prefix' => 'v1', 'middleware' => ['api', 'api-throttle:api']], fu
'show'
]
)->name('api.files.show')
->where(['object_type' => 'accessories|audits|assets|components|consumables|hardware|licenses|locations|maintenances|models|users']);
->where(['object_type' => 'accessories|audits|assets|components|consumables|hardware|licenses|locations|maintenances|models|suppliers|users']);
// Upload files(s)
Route::post('{object_type}/{id}/files',
@ -1366,7 +1366,7 @@ Route::group(['prefix' => 'v1', 'middleware' => ['api', 'api-throttle:api']], fu
'store'
]
)->name('api.files.store')
->where(['object_type' => 'accessories|audits|assets|components|consumables|hardware|licenses|locations|maintenances|models|users']);
->where(['object_type' => 'accessories|audits|assets|components|consumables|hardware|licenses|locations|maintenances|models|suppliers|users']);
// Delete files(s)
Route::delete('{object_type}/{id}/files/{file_id}/delete',
@ -1375,6 +1375,6 @@ Route::group(['prefix' => 'v1', 'middleware' => ['api', 'api-throttle:api']], fu
'destroy'
]
)->name('api.files.destroy')
->where(['object_type' => 'accessories|assets|components|consumables|hardware|licenses|locations|maintenances|models|users']);
->where(['object_type' => 'accessories|assets|components|consumables|hardware|licenses|locations|maintenances|models|suppliers|users']);
}); // end API routes

View File

@ -716,7 +716,7 @@ Route::group(['middleware' => 'web'], function () {
'show'
]
)->name('ui.files.show')
->where(['object_type' => 'assets|audits|maintenances|hardware|models|users|locations|accessories|consumables|licenses|components']);
->where(['object_type' => 'assets|audits|maintenances|hardware|models|users|locations|accessories|consumables|licenses|suppliers|components']);
// Upload files(s)
Route::post('{object_type}/{id}/files',
@ -725,7 +725,7 @@ Route::group(['middleware' => 'web'], function () {
'store'
]
)->name('ui.files.store')
->where(['object_type' => 'assets|audits|maintenances|hardware|models|users|locations|accessories|consumables|licenses|components']);
->where(['object_type' => 'assets|audits|maintenances|hardware|models|users|locations|accessories|consumables|licenses|suppliers|components']);
// Delete files(s)
Route::delete('{object_type}/{id}/files/{file_id}/delete',
@ -734,7 +734,7 @@ Route::group(['middleware' => 'web'], function () {
'destroy'
]
)->name('ui.files.destroy')
->where(['object_type' => 'assets|maintenances|hardware|models|users|locations|accessories|consumables|licenses|components']);
->where(['object_type' => 'assets|maintenances|hardware|models|users|locations|accessories|consumables|licenses|suppliers|components']);
});