85 Commits

Author SHA1 Message Date
Josh
ddcbafe9d9
tests(upload): fix error logs in upload tests (#18261)
* chore: add test utils

* test(upload): fix useModalQueryParams

* test(upload): fix TableRows

* test(upload): fix useConfig test

* test(upload): fix useFolder tests

* test(upload): fix useFolders test

* test(upload): fix SettingsPage tests

* test(upload): fix UploadAssetDialog tests

* test(upload): fix CarouselAssets tests
2023-10-04 16:03:02 +01:00
Josh
4d92b11512 fix: set a fallback where we define window.strapi.backendURL 2023-09-12 13:45:08 +01:00
Josh
3e310c9743 fix: fallback to window.location.href if backendURL is not defined (#17982)
Co-authored-by: Jamie Howard <48524071+jhoward1994@users.noreply.github.com>
2023-09-11 19:05:40 +02:00
Josh
ee84e7403c fix: relativeURLs fail with appendSearchParamsToUrl (#17967)
Co-authored-by: ramiel <ramielwan48@gmail.com>
2023-09-11 19:05:28 +02:00
Dave
0c7c3d0f5c
fix(upload): asset url appending (#17751) 2023-08-31 08:35:02 +01:00
Gustav Hansen
77d3084a51 fix(upload): Use native fetch over API client for downloadFile 2023-08-01 12:43:43 +02:00
Fernando Chavez
4389dce4d1 fix problem when uploading assets from url 2023-07-26 16:16:35 +02:00
Gustav Hansen
df872f2fd4 Chore: Drop getRequestUrl 2023-07-25 13:40:25 +02:00
Josh
96d8ebb0c8 fix: CM media-input browsing 2023-07-10 10:26:01 +01:00
Josh
239d832457 refactor: useAsset query to use folderPath 2023-06-30 08:45:49 +01:00
Gustav Hansen
dca5778d8e Chore: Apply eslint import sorting fix 2023-06-12 21:34:07 +02:00
Simone
49a5c205d4
Chore: Replace axios calls with helper-plugin utils (#16628)
* overwrite the Authorization header when passed as config

* replace axios call with fetchClient and remove axios cancel from the admin

* replace axios call in the UseCasePage form

* replace axios with useFetchClient inside the App component for the analytics call

* replace axios calls with the post useFetchClient inside the AuthPage

* remove axios instances inside the CollectionTypeFormWrapper and the SingleTypeFormWrapper

* Replace axios call with useFetchClient inside the Register component

* replace axios call with useFetchClient sinde the urlToFile utils

* remove axios instances inside the useFetchContentTypeLayout

* remove axios instances inside the ComponentSettingsView component

* update test urlToFile

* remove axios as dependency in admin and remove cancel token from ListView

* remove axios dependency from the admin

* revert dependency

* replace the downloadFile axios call with getFetchClient

* remove console log

* fix issue if preferedLanguage is null

* replace axios call with getFetchClient inside the urlToAssets utility

* revert back cancel token inside CollectionTypeFormWrapper

* revert cancel token logic

* add the logic to handle paths without prepending slash

* remove tip for the relative path

* move the fetchMarketplaceProviders util inside the useFetchMarketplaceProviders file

* use fetch instead of useFetchClient for external calls

* remove the control of the preferedLanguage inside the Profile page

* move up useFetchClient call

* refactor normalize url

* add mock getFetchClient in FromComputerForm test

* fix check full url

* refactor fetch

* cleanup code

* fix comments

* fix review comments

* refaactor fetch calls and fix types and format code

* add more info in the documentation

* fix unit tests marketplace and add a constants file shared between the two hooks

* change the import order

* refactor hooks returining type

* move whatwg-fetch import inside the admin-test-util and small refactoring

* fix test, remove comments and remove only
2023-05-17 11:01:28 +02:00
Marc-Roig
162b46e7f9 remove query parameters from asset 2023-02-19 18:08:31 +01:00
Jamie Howard
751c69d478 feat(upload): extend entity manager to sign private media URLs 2023-02-09 16:39:26 +00:00
Marc-Roig
4e6731ec58 make s3 bucket private 2023-02-09 15:02:15 +01:00
Simone Taeggi
96a589dfc5 remove the axiosInstance implementation on the upload 2023-01-26 17:31:51 +01:00
Simone Taeggi
ae372c8afb replace axiosInstance in the deleteRequest utils to replace the api calls with the getFetchClient del method 2023-01-26 17:27:50 +01:00
Simone Taeggi
c2e11e481e replace axiosInstance in the useFolders hook to replace the api call with the useFetchClient get method and update test 2023-01-26 10:26:45 +01:00
Gustav Hansen
85637195bb Chore: Upgrade axios to 1.2.1 2022-12-22 14:43:19 +01:00
Julie Plantey
b81486c8c9 (chore): feedback fix jsdoc + removed comments 2022-12-07 18:16:14 +01:00
Julie Plantey
da676b2c4c fix folder navigation being link or button + tests 2022-11-24 16:52:35 +01:00
Julie Plantey
375d0b003f make TableList compatible with ML modal 2022-11-24 15:02:45 +01:00
Marc-Roig
e34381faff Merge branch 'master' into fix/upload-image-without-extension 2022-08-11 16:34:48 +02:00
Alexandre Bodin
cf49ddbbfc Prettier and backend fix 2022-08-11 10:20:49 +02:00
Marc-Roig
c7f14a4706 remove function comment as it is self explanatory 2022-08-10 09:14:45 +02:00
Marc-Roig
504c333bcb change function name to getFilenameFromURL 2022-08-10 09:13:15 +02:00
Marc-Roig
7bf2612a15 use last element of path as filename 2022-08-09 18:14:15 +02:00
Marc-Roig
10ea1e4ea2 refactor clean url 2022-08-09 11:43:54 +02:00
Marc-Roig
fce7a9112a change cleanURL description 2022-08-08 14:10:08 +02:00
Marc-Roig
08cb683bd1 clean url when uploading media from url 2022-08-08 14:06:30 +02:00
Julie Plantey
ffde4d4b58 hide breadcrumbs if in root of ML + added tests 2022-08-04 16:25:50 +02:00
Julie Plantey
324b1628f6 fixed translations 2022-08-04 15:15:55 +02:00
Julie Plantey
c824230092 added test for getBreadcrumbDataCM 2022-08-01 12:05:18 +02:00
Julie Plantey
bdc0454cd7 breadcrumbs in ML modal - CM 2022-07-31 17:43:42 +02:00
Julie Plantey
2774384c89 breadcrumbs in upload page 2022-07-31 16:39:47 +02:00
Gustav Hansen
bd6813aab7 containsAssetFilter: Rename method and add tests 2022-06-08 08:42:53 +01:00
Gustav Hansen
f7a5b866ea ML: Skip loading folders if an asset only filter is applied 2022-06-07 16:56:01 +01:00
ronronscelestes
a93e5e9119 fixed getRequestUrl and added tests 2022-05-23 17:55:29 +02:00
Gustav Hansen
989f22b089 findRecursiveFolderMetadatas: Simplify tests, add nullish test 2022-05-23 09:29:00 +02:00
ronronscelestes
c8f6e5c700 updated findRecursiveFolderMetadatas tests 2022-05-19 18:08:25 +02:00
ronronscelestes
058f808054 refactor findRecursiveFolderMetadatas, truncate label, reuse isNestedFolder 2022-05-19 18:04:54 +02:00
ronronscelestes
39982a69a5 fix using parseInt instead of Number 2022-05-19 10:37:54 +02:00
ronronscelestes
535fcf6c39 refactor findRecursiveParentFolderId 2022-05-18 19:09:46 +02:00
ronronscelestes
711945f5ef find parent folder id and use it in back button 2022-05-18 17:34:49 +02:00
Gustav Hansen
7a9b7fec27 ML: Add tests for useBulkRemove and findRecursiveFolderByValue 2022-05-11 13:43:33 +02:00
Gustav Hansen
4a33486ec6 useFolderStructure: Move root folder creation into hook 2022-05-10 16:46:26 +02:00
Gustav Hansen
19d498d199 ML: Replace removeAssetQuery with deleteRequest 2022-04-28 13:50:29 +02:00
Gustav Hansen
a26788bcef ML: Add audio type to filters 2022-03-23 15:38:04 +01:00
Gustav Hansen
71d2c70b62 formatDuration: add tests 2022-03-17 11:32:26 +01:00
Gustav Hansen
26a2786b84 ML: Fix format of video duration 2022-03-17 11:32:26 +01:00