Display uploaded media

Summary:
* Make sure uploadIDs are converted into CDN urls and displayed
* Changed type of uploadID's to strings, as numbers are

Reviewed By: priteshrnandgaonkar

Differential Revision: D18762974

fbshipit-source-id: d94af61b0bc114b5f0cc2bfcde98fd491058e971
This commit is contained in:
Michel Weststrate
2019-12-02 11:40:01 -08:00
committed by Facebook Github Bot
parent d791814dfa
commit 3e8a026618
5 changed files with 13 additions and 4 deletions

View File

@@ -102,6 +102,7 @@
"jest": "^24.7.1",
"jest-fetch-mock": "^2.1.0",
"prettier": "^1.19.1",
"react-async": "^10.0.0",
"redux-mock-store": "^1.5.3",
"ts-jest": "^24.1.0",
"typescript": "^3.7.2"

View File

@@ -11,7 +11,7 @@ export function getUser() {
return Promise.reject();
}
export async function internGraphAPIRequest(
export async function internGraphPOSTAPIRequest(
endpoint: string,
formFields: {
[key: string]: any;

View File

@@ -12,7 +12,7 @@ export * from './ui/index';
export {getStringFromErrorLike, textContent} from './utils/index';
export {default as GK} from './fb-stubs/GK';
export {default as createPaste} from './fb-stubs/createPaste';
export {internGraphAPIRequest, graphQLQuery} from './fb-stubs/user';
export {internGraphPOSTAPIRequest, graphQLQuery} from './fb-stubs/user';
export {
FlipperBasePlugin,
FlipperPlugin,

View File

@@ -9,9 +9,12 @@
import {Actions} from './';
type SubmediaType =
| {uploadID: number; status: 'Uploaded'}
| {uploadID: string; status: 'Uploaded'}
| {status: 'NotUploaded' | 'Uploading'};
type MediaObject = SubmediaType & {description: string; path: string};
type MediaObject = SubmediaType & {
description: string;
path: string;
};
export type MediaType = Array<MediaObject>;
export type SupportFormV2State = {
title: string;

View File

@@ -7323,6 +7323,11 @@ rc@^1.0.1, rc@^1.1.6, rc@^1.2.1, rc@^1.2.7, rc@^1.2.8:
minimist "^1.2.0"
strip-json-comments "~2.0.1"
react-async@^10.0.0:
version "10.0.0"
resolved "https://registry.yarnpkg.com/react-async/-/react-async-10.0.0.tgz#3a123017692e130b35b82e5e426699ac3f4d609b"
integrity sha512-Uk7yG49ftaJ1ShMfgTqsZUcEIRxdWHV2ABojw+dzFifCSMeqydCFhzj9x7okACClCzMDgkGqC5/bOtY95yQG1A==
react-color@^2.11.7:
version "2.17.3"
resolved "https://registry.yarnpkg.com/react-color/-/react-color-2.17.3.tgz#b8556d744f95193468c7061d2aa19180118d4a48"